Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Modules / CMakeSystemSpecificInformation.cmake
blob561f5e31e3b22a72a1aa3acfdfe58fe3d1d5ef76
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.
11 SET(APPLE  )
12 SET(UNIX   )
13 SET(CYGWIN )
14 SET(WIN32  )
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("You 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 # for most systems a module is the same as a shared library
39 # so unless the variable CMAKE_MODULE_EXISTS is set just
40 # copy the values from the LIBRARY variables
41 # this has to be done after the system information has been loaded
42 IF(NOT CMAKE_MODULE_EXISTS)
43   SET(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
44   SET(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
45   SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
46   SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
47 ENDIF(NOT CMAKE_MODULE_EXISTS)
50 SET(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)