diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-10-22 14:34:07 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-10-22 14:34:07 (GMT) |
commit | b1114a344fcda35984140e0bc538d32035d5310a (patch) | |
tree | 41073546fd534d065a2e3499d6f39374088fbde1 /Modules/CMakeSystemSpecificInformation.cmake | |
parent | c1c74f925cf249e260ea94532205dc954852d7cd (diff) | |
download | CMake-b1114a344fcda35984140e0bc538d32035d5310a.zip CMake-b1114a344fcda35984140e0bc538d32035d5310a.tar.gz CMake-b1114a344fcda35984140e0bc538d32035d5310a.tar.bz2 |
new cmake based configuration
Diffstat (limited to 'Modules/CMakeSystemSpecificInformation.cmake')
-rw-r--r-- | Modules/CMakeSystemSpecificInformation.cmake | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake new file mode 100644 index 0000000..1615d9f --- /dev/null +++ b/Modules/CMakeSystemSpecificInformation.cmake @@ -0,0 +1,35 @@ +# this module sets system information like how to build libraries +# before including this file the system, C, and C++ compilers must +# have already been determined. +# This file first sets default variables that can be used for most +# makefiles. Next, it will include a system specific file. Finally, +# it will optionally include a system and compiler specific file that +# can be used to override any of this information. + + +# 1. set default values that will work for most system +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + "${CMAKE_CXX_COMPILE} ${CMAKE_SHARED_LIBRARY_CREATE_FLAGS} ${CMAKE_CXX_LINK_SHARED_OUT_FLAG} <TARGET> <OBJECTS>") + +SET(CMAKE_CXX_CREATE_AR_LIBRARY + "${CMAKE_AR} ${CMAKE_AR_FLAGS} <TARGET> <OBJECTS>") + +# 2. now include SystemName.cmake file to set the system specific information +SET(CMAKE_SYSTEM_INFO_FILE ${CMAKE_ROOT}/Modules/${CMAKE_SYSTEM_NAME}.cmake) +IF(EXISTS ${CMAKE_SYSTEM_INFO_FILE}) + INCLUDE(${CMAKE_SYSTEM_INFO_FILE}) +ELSE(EXISTS ${CMAKE_SYSTEM_INFO_FILE}) + MESSAGE("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}" + " to use this system, please send your config file to " + "cmake@www.cmake.org so it can be added to cmake"") +ENDIF(EXISTS ${CMAKE_SYSTEM_INFO_FILE}) + + +# 3. include optional systemname-compiler.cmake files +IF(CMAKE_C_COMPILER) + INCLUDE(${CMAKE_ROOT}/Modules/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER}.cmake OPTIONAL) +ENDIF(CMAKE_C_COMPILER) +IF(CMAKE_CXX_COMPILER) + INCLUDE(${CMAKE_ROOT}/Modules/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER}.cmake + OPTIONAL) +ENDIF(CMAKE_CXX_COMPILER) |