summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-05-17 14:07:51 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-05-17 14:07:51 (GMT)
commit871f7cf2220906169bf1f7aebdf508c2e57ba2e1 (patch)
treed74b617827f536ceea81c05dda2f7829645942c8 /Modules/CMakeDetermineCompilerId.cmake
parent0c7130905d3e32dd521bbcbf043c589ef5b6b1e5 (diff)
downloadCMake-871f7cf2220906169bf1f7aebdf508c2e57ba2e1.zip
CMake-871f7cf2220906169bf1f7aebdf508c2e57ba2e1.tar.gz
CMake-871f7cf2220906169bf1f7aebdf508c2e57ba2e1.tar.bz2
ENH: fix up compiler id to be more robust
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 9a06acf..b612e75 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -53,6 +53,10 @@ MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
"${CMAKE_${lang}_COMPILER_ID_SRC}\" failed with the following output:\n"
"${CMAKE_${lang}_COMPILER_ID_RESULT}\n"
"${CMAKE_${lang}_COMPILER_ID_OUTPUT}\n\n")
+ MESSAGE(FATAL_ERROR "Compiling the ${lang} compiler identification source file \""
+ "${CMAKE_${lang}_COMPILER_ID_SRC}\" failed with the following output:\n"
+ "${CMAKE_${lang}_COMPILER_ID_RESULT}\n"
+ "${CMAKE_${lang}_COMPILER_ID_OUTPUT}\n\n")
ELSE(CMAKE_${lang}_COMPILER_ID_RESULT)
# Compilation succeeded.
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
@@ -110,5 +114,12 @@ MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
"${CMAKE_${lang}_COMPILER_ID_DIR} "
"with a name known to CMake.\n\n")
ENDIF(CMAKE_${lang}_COMPILER_ID_EXE)
+
+ IF(CMAKE_${lang}_COMPILER_ID)
+ MESSAGE(STATUS "The ${lang} compiler identification is "
+ "${CMAKE_${lang}_COMPILER_ID}")
+ ELSE(CMAKE_${lang}_COMPILER_ID)
+ MESSAGE(STATUS "The ${lang} compiler identification is unknown")
+ ENDIF(CMAKE_${lang}_COMPILER_ID)
ENDIF(CMAKE_${lang}_COMPILER_ID_RESULT)
ENDMACRO(CMAKE_DETERMINE_COMPILER_ID)