1# Distributed under the OSI-approved BSD 3-Clause License. See accompanying 2# file Copyright.txt or https://cmake.org/licensing for details. 3 4 5# This file is included by cmGlobalGenerator::EnableLanguage. 6# It is included after the compiler has been determined, so 7# we know things like the compiler name and if the compiler is gnu. 8 9# before cmake 2.6 these variables were set in cmMakefile.cxx. This is still 10# done to keep scripts and custom language and compiler modules working. 11# But they are reset here and set again in the platform files for the target 12# platform, so they can be used for testing the target platform instead 13# of testing the host platform. 14set(APPLE ) 15set(UNIX ) 16set(CYGWIN ) 17set(MSYS ) 18set(WIN32 ) 19 20 21# include Generic system information 22include(CMakeGenericSystem) 23 24# 2. now include SystemName.cmake file to set the system specific information 25set(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME}) 26 27include(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE) 28 29if(NOT _INCLUDED_SYSTEM_INFO_FILE) 30 message("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}" 31 " to use this system, please post your config file on " 32 "discourse.cmake.org so it can be added to cmake") 33 if(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) 34 configure_file(${CMAKE_BINARY_DIR}/CMakeCache.txt 35 ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY) 36 message("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. " 37 "Please post that file on discourse.cmake.org.") 38 endif() 39endif() 40 41# optionally include a file which can do extra-generator specific things, e.g. 42# CMakeFindEclipseCDT4.cmake asks gcc for the system include dirs for the Eclipse CDT4 generator 43if(CMAKE_EXTRA_GENERATOR) 44 string(REPLACE " " "" _CMAKE_EXTRA_GENERATOR_NO_SPACES ${CMAKE_EXTRA_GENERATOR} ) 45 include("CMakeFind${_CMAKE_EXTRA_GENERATOR_NO_SPACES}" OPTIONAL) 46endif() 47 48 49# for most systems a module is the same as a shared library 50# so unless the variable CMAKE_MODULE_EXISTS is set just 51# copy the values from the LIBRARY variables 52# this has to be done after the system information has been loaded 53if(NOT CMAKE_MODULE_EXISTS) 54 set(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}") 55 set(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}") 56endif() 57 58 59set(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1) 60