diff options
author | Brad King <brad.king@kitware.com> | 2009-07-23 14:06:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-23 14:06:31 (GMT) |
commit | 797e49a1cc53fb120fad286665c875075eb18361 (patch) | |
tree | 35981054a7242db17c003936e9b4a9d87b50ed9f /Modules/CMakeCInformation.cmake | |
parent | f10c25816761c8e4f9bddf85c76a2022ff9730f9 (diff) | |
download | CMake-797e49a1cc53fb120fad286665c875075eb18361.zip CMake-797e49a1cc53fb120fad286665c875075eb18361.tar.gz CMake-797e49a1cc53fb120fad286665c875075eb18361.tar.bz2 |
ENH: Load platform-independent per-compiler files
This teaches the language configuration modules to load per-compiler
information for each language using the compiler id but no system name.
They look for modules named "Compiler/<id>-<lang>.cmake". Such modules
may specify compiler flags that do not depend on the platform.
Diffstat (limited to 'Modules/CMakeCInformation.cmake')
-rw-r--r-- | Modules/CMakeCInformation.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index bb3142c..e163b30 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -12,6 +12,12 @@ IF(UNIX) ELSE(UNIX) SET(CMAKE_C_OUTPUT_EXTENSION .obj) ENDIF(UNIX) + +# Load compiler-specific information. +IF(CMAKE_C_COMPILER_ID) + INCLUDE(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL) +ENDIF(CMAKE_C_COMPILER_ID) + SET(CMAKE_BASE_NAME) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE) IF(CMAKE_COMPILER_IS_GNUCC) |