CMakeSystemSpecificInformation.cmake 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # This file is included by cmGlobalGenerator::EnableLanguage.
  2. # It is included after the compiler has been determined, so
  3. # we know things like the compiler name and if the compiler is gnu.
  4. # include Generic system information
  5. INCLUDE(CMakeGenericSystem)
  6. # 2. now include SystemName.cmake file to set the system specific information
  7. SET(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME})
  8. INCLUDE(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE)
  9. IF(NOT _INCLUDED_SYSTEM_INFO_FILE)
  10. MESSAGE("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
  11. " to use this system, please send your config file to "
  12. "[email protected] so it can be added to cmake")
  13. IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
  14. CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt
  15. ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
  16. MESSAGE("You CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
  17. "Please send that file to [email protected].")
  18. ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
  19. ENDIF(NOT _INCLUDED_SYSTEM_INFO_FILE)
  20. # for most systems a module is the same as a shared library
  21. # so unless the variable CMAKE_MODULE_EXISTS is set just
  22. # copy the values from the LIBRARY variables
  23. # this has to be done after the system information has been loaded
  24. IF(NOT CMAKE_MODULE_EXISTS)
  25. SET(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
  26. SET(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
  27. SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
  28. SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
  29. ENDIF(NOT CMAKE_MODULE_EXISTS)
  30. SET(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)