summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineCXXCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-11 17:00:54 -0500
committerBrad King <brad.king@kitware.com>2008-02-11 17:00:54 -0500
commita75079d9e08c0325a0165f2dbfc10e5c1fa61eec (patch)
treed93267be4ab59d4e4881faa25f7ae1094489cfcc /Modules/CMakeDetermineCXXCompiler.cmake
parent3fdf141197210532446d345c482303d0ffac13a1 (diff)
downloadcmake-a75079d9e08c0325a0165f2dbfc10e5c1fa61eec.tar.gz
ENH: When detecting the compiler id try compiling only to an object file.
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 2286bfa629..d354165a00 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -122,6 +122,14 @@ ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_CXX_COMPILER_ID_RUN)
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
+ # Each entry in this list is a set of extra flags to try
+ # adding to the compile line to see if it helps produce
+ # a valid identification file.
+ SET(CMAKE_CXX_COMPILER_ID_TEST_FLAGS
+ # Try compiling to an object file only.
+ "-c"
+ )
+
# Try to identify the compiler.
SET(CMAKE_CXX_COMPILER_ID)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)