CMakeSystemSpecificInitialize.cmake 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. unset(AIX)
  18. # The CMAKE_EFFECTIVE_SYSTEM_NAME is used to load compiler and compiler
  19. # wrapper configuration files. By default it equals to CMAKE_SYSTEM_NAME
  20. # but could be overridden in the ${CMAKE_SYSTEM_NAME}-Initialize files.
  21. #
  22. # It is useful to share the same aforementioned configuration files and
  23. # avoids duplicating them in case of tightly related platforms.
  24. #
  25. # An example are the platforms supported by Xcode (macOS, iOS, tvOS, visionOS
  26. # and watchOS). For all of those the CMAKE_EFFECTIVE_SYSTEM_NAME is
  27. # set to Apple which results in using
  28. # Platform/Apple-AppleClang-CXX.cmake for the Apple C++ compiler.
  29. set(CMAKE_EFFECTIVE_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
  30. include(Platform/${CMAKE_SYSTEM_NAME}-Initialize OPTIONAL)
  31. set(CMAKE_SYSTEM_SPECIFIC_INITIALIZE_LOADED 1)