2 #=============================================================================
3 # Copyright 2002-2009 Kitware, Inc.
5 # Distributed under the OSI-approved BSD License (the "License");
6 # see accompanying file Copyright.txt for details.
8 # This software is distributed WITHOUT ANY WARRANTY; without even the
9 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 # See the License for more information.
11 #=============================================================================
12 # (To distribute this file outside of CMake, substitute the full
13 # License text for the above reference.)
15 # This file is included by cmGlobalGenerator::EnableLanguage.
16 # It is included after the compiler has been determined, so
17 # we know things like the compiler name and if the compiler is gnu.
19 # before cmake 2.6 these variables were set in cmMakefile.cxx. This is still
20 # done to keep scripts and custom language and compiler modules working.
21 # But they are reset here and set again in the platform files for the target
22 # platform, so they can be used for testing the target platform instead
23 # of testing the host platform.
30 # include Generic system information
31 include(CMakeGenericSystem)
33 # 2. now include SystemName.cmake file to set the system specific information
34 set(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME})
36 include(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE)
38 if(NOT _INCLUDED_SYSTEM_INFO_FILE)
39 message("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
40 " to use this system, please send your config file to "
41 "cmake@www.cmake.org so it can be added to cmake")
42 if(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
43 configure_file(${CMAKE_BINARY_DIR}/CMakeCache.txt
44 ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
45 message("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
46 "Please send that file to cmake@www.cmake.org.")
51 # optionally include a file which can do extra-generator specific things, e.g.
52 # CMakeFindEclipseCDT4.cmake asks gcc for the system include dirs for the Eclipse CDT4 generator
53 if(CMAKE_EXTRA_GENERATOR)
54 string(REPLACE " " "" _CMAKE_EXTRA_GENERATOR_NO_SPACES ${CMAKE_EXTRA_GENERATOR} )
55 include("CMakeFind${_CMAKE_EXTRA_GENERATOR_NO_SPACES}" OPTIONAL)
59 # for most systems a module is the same as a shared library
60 # so unless the variable CMAKE_MODULE_EXISTS is set just
61 # copy the values from the LIBRARY variables
62 # this has to be done after the system information has been loaded
63 if(NOT CMAKE_MODULE_EXISTS)
64 set(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
65 set(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
69 set(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)