summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineFortranCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-07 15:27:28 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-07 15:27:28 (GMT)
commit4b2218045d133eb58afd96ac455942a69ea8d9ca (patch)
tree85ea2dedcaf5a89f2696ae4ed7d24200cf662d2e /Modules/CMakeDetermineFortranCompiler.cmake
parent0d916d4e7236b227d3098de3f7d975300b1742cd (diff)
downloadCMake-4b2218045d133eb58afd96ac455942a69ea8d9ca.zip
CMake-4b2218045d133eb58afd96ac455942a69ea8d9ca.tar.gz
CMake-4b2218045d133eb58afd96ac455942a69ea8d9ca.tar.bz2
ENH: Add support to CMAKE_DETERMINE_COMPILER_ID macro to try building the id source more than once with different extra flags added to the compiler. Use the support to correctly identify the Intel Fortran compiler on windows which does not preprocess by default without special flags.
Diffstat (limited to 'Modules/CMakeDetermineFortranCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 3776f16..52d041f 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -80,9 +80,16 @@ ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
SET(CMAKE_Fortran_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 executable.
+ SET(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS
+ # Intel on windows does not preprocess by default.
+ "-fpp"
+ )
+
# Try to identify the compiler.
SET(CMAKE_Fortran_COMPILER_ID)
- SET(CMAKE_Fortran_COMPILER_ID_ALLOW_FAIL 1)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(Fortran FFLAGS ${CMAKE_ROOT}/Modules/CMakeFortranCompilerId.F90)