2 # This file is included by cmGlobalGenerator::EnableLanguage.
3 # It is included after the compiler has been determined, so
4 # we know things like the compiler name and if the compiler is gnu.
6 # before cmake 2.6 these variables were set in cmMakefile.cxx. This is still
7 # done to keep scripts and custom language and compiler modules working.
8 # But they are reset here and set again in the platform files for the target
9 # platform, so they can be used for testing the target platform instead
10 # of testing the host platform.
17 # include Generic system information
18 INCLUDE(CMakeGenericSystem)
20 # 2. now include SystemName.cmake file to set the system specific information
21 SET(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME})
23 INCLUDE(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE)
25 IF(NOT _INCLUDED_SYSTEM_INFO_FILE)
26 MESSAGE("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
27 " to use this system, please send your config file to "
28 "cmake@www.cmake.org so it can be added to cmake")
29 IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
30 CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt
31 ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
32 MESSAGE("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
33 "Please send that file to cmake@www.cmake.org.")
34 ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
35 ENDIF(NOT _INCLUDED_SYSTEM_INFO_FILE)
38 # optionally include a file which can do extra-generator specific things, e.g.
39 # CMakeFindEclipseCDT4.cmake asks gcc for the system include dirs for the Eclipse CDT4 generator
40 IF(CMAKE_EXTRA_GENERATOR)
41 STRING(REPLACE " " "" _CMAKE_EXTRA_GENERATOR_NO_SPACES ${CMAKE_EXTRA_GENERATOR} )
42 INCLUDE("CMakeFind${_CMAKE_EXTRA_GENERATOR_NO_SPACES}" OPTIONAL)
43 ENDIF(CMAKE_EXTRA_GENERATOR)
46 # for most systems a module is the same as a shared library
47 # so unless the variable CMAKE_MODULE_EXISTS is set just
48 # copy the values from the LIBRARY variables
49 # this has to be done after the system information has been loaded
50 IF(NOT CMAKE_MODULE_EXISTS)
51 SET(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
52 SET(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
53 SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
54 SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
55 ENDIF(NOT CMAKE_MODULE_EXISTS)
58 SET(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)