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 compiled-in in cmake
  5. # now they are set in the Modules/${CMAKE_SYSTEM_NAME}.cmake file
  6. # In order to keep custom language or compiler files working which might use
  7. # these variables, they are set to the value of the compiled-in variables in
  8. # CMakeDetermineSystem.cmake and reset here.
  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)