CMakeSystemSpecificInitialize.cmake 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. # This file is included by cmGlobalGenerator::EnableLanguage.
  4. # It is included before the compiler has been determined.
  5. # before cmake 2.6 these variables were set in cmMakefile.cxx. This is still
  6. # done to keep scripts and custom language and compiler modules working.
  7. # But they are reset here and set again in the platform files for the target
  8. # platform, so they can be used for testing the target platform instead
  9. # of testing the host platform.
  10. unset(APPLE)
  11. unset(UNIX)
  12. unset(CYGWIN)
  13. unset(MSYS)
  14. unset(WIN32)
  15. unset(BSD)
  16. unset(LINUX)
  17. # The CMAKE_EFFECTIVE_SYSTEM_NAME is used to load compiler and compiler
  18. # wrapper configuration files. By default it equals to CMAKE_SYSTEM_NAME
  19. # but could be overridden in the ${CMAKE_SYSTEM_NAME}-Initialize files.
  20. #
  21. # It is useful to share the same aforementioned configuration files and
  22. # avoids duplicating them in case of tightly related platforms.
  23. #
  24. # An example are the platforms supported by Xcode (macOS, iOS, tvOS, visionOS
  25. # and watchOS). For all of those the CMAKE_EFFECTIVE_SYSTEM_NAME is
  26. # set to Apple which results in using
  27. # Platform/Apple-AppleClang-CXX.cmake for the Apple C++ compiler.
  28. set(CMAKE_EFFECTIVE_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
  29. include(Platform/${CMAKE_SYSTEM_NAME}-Initialize OPTIONAL)
  30. set(CMAKE_SYSTEM_SPECIFIC_INITIALIZE_LOADED 1)