summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXInformation.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-05-03 12:24:32 (GMT)
committerBrad King <brad.king@kitware.com>2007-05-03 12:24:32 (GMT)
commit44ab336a0c4afe9dab6e7d038aec9a27c7ee92c7 (patch)
treebac63ae60cc6d84d525aac20dddcf739b3b6b1c8 /Modules/CMakeCXXInformation.cmake
parentdf84f9b8611c58bec0112bacf3f76c0c29285ed4 (diff)
downloadCMake-44ab336a0c4afe9dab6e7d038aec9a27c7ee92c7.zip
CMake-44ab336a0c4afe9dab6e7d038aec9a27c7ee92c7.tar.gz
CMake-44ab336a0c4afe9dab6e7d038aec9a27c7ee92c7.tar.bz2
ENH: Merging CompilerId updates from branch CMake-Modules-CompilerId to the main tree. Changes between CMake-Modules-CompilerId-mp1 and CMake-Modules-CompilerId-mp2 are included.
Diffstat (limited to 'Modules/CMakeCXXInformation.cmake')
-rw-r--r--Modules/CMakeCXXInformation.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 4e03bf3..ef1b07e 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -8,6 +8,11 @@ GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_BASE_NAME g++)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+IF(CMAKE_CXX_COMPILER_ID)
+ IF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX.cmake)
+ SET(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER_ID}-CXX)
+ ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX.cmake)
+ENDIF(CMAKE_CXX_COMPILER_ID)
SET(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
@@ -43,9 +48,9 @@ IF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
-IF(NOT CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
+ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})