CMakeSystemSpecificInformation.cmake 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. # before cmake 2.6 these variables were set in cmMakefile.cxx. This is still
  5. # done to keep scripts and custom language and compiler modules working.
  6. # But they are reset here and set again in the platform files for the target
  7. # platform, so they can be used for testing the target platform instead
  8. # of testing the host platform.
  9. SET(APPLE )
  10. SET(UNIX )
  11. SET(CYGWIN )
  12. SET(WIN32 )
  13. # include Generic system information
  14. INCLUDE(CMakeGenericSystem)
  15. # 2. now include SystemName.cmake file to set the system specific information
  16. SET(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME})
  17. INCLUDE(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE)
  18. IF(NOT _INCLUDED_SYSTEM_INFO_FILE)
  19. MESSAGE("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
  20. " to use this system, please send your config file to "
  21. "[email protected] so it can be added to cmake")
  22. IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
  23. CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt
  24. ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
  25. MESSAGE("You CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
  26. "Please send that file to [email protected].")
  27. ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
  28. ENDIF(NOT _INCLUDED_SYSTEM_INFO_FILE)
  29. # for most systems a module is the same as a shared library
  30. # so unless the variable CMAKE_MODULE_EXISTS is set just
  31. # copy the values from the LIBRARY variables
  32. # this has to be done after the system information has been loaded
  33. IF(NOT CMAKE_MODULE_EXISTS)
  34. SET(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
  35. SET(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
  36. SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
  37. SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
  38. ENDIF(NOT CMAKE_MODULE_EXISTS)
  39. SET(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)