CMakeSystemSpecificInformation.cmake 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}.cmake)
  8. IF(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
  9. INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
  10. ELSE(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
  11. MESSAGE("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
  12. " to use this system, please send your config file to "
  13. "[email protected] so it can be added to cmake")
  14. IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
  15. CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt
  16. ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
  17. MESSAGE("You CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
  18. "Please send that file to [email protected].")
  19. ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
  20. ENDIF(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
  21. # for most systems a module is the same as a shared library
  22. # so unless the variable CMAKE_MODULE_EXISTS is set just
  23. # copy the values from the LIBRARY variables
  24. # this has to be done after the system information has been loaded
  25. IF(NOT CMAKE_MODULE_EXISTS)
  26. SET(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
  27. SET(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
  28. SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
  29. SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
  30. ENDIF(NOT CMAKE_MODULE_EXISTS)
  31. SET(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)