CMakeSystemSpecificInformation.cmake 1.8 KB

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