summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-18 14:57:46 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-18 14:59:35 (GMT)
commitc65a060e1b19a463312f9003bc4d7793db9630e5 (patch)
tree823f62c243e129b6cd7e0f8cee4e0d807dd0b56c /Modules/CMakeDetermineCompilerId.cmake
parente2e6cb7348dfffddb5d93f679fc8c69fffd3d1dc (diff)
downloadCMake-c65a060e1b19a463312f9003bc4d7793db9630e5.zip
CMake-c65a060e1b19a463312f9003bc4d7793db9630e5.tar.gz
CMake-c65a060e1b19a463312f9003bc4d7793db9630e5.tar.bz2
CMakeDetermineCompilerId: Optionally try some flags before no flags
Teach CMAKE_DETERMINE_COMPILER_ID to optionally try detecting the compiler id using some given flags before trying to detect it with no special flags. This will be useful for Fortran detection to distinguish some compilers that use the preprocessors of others but have no macro of their own by getting verbose output.
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 403ac08..7ddf33f 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -34,7 +34,9 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
# Try building with no extra flags and then try each set
# of helper flags. Stop when the compiler is identified.
- foreach(flags "" ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
+ foreach(flags ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS_FIRST}
+ ""
+ ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
if(NOT CMAKE_${lang}_COMPILER_ID)
CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
foreach(file ${COMPILER_${lang}_PRODUCED_FILES})