diff options
author | Brad King <brad.king@kitware.com> | 2008-01-07 15:27:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-07 15:27:28 (GMT) |
commit | 4b2218045d133eb58afd96ac455942a69ea8d9ca (patch) | |
tree | 85ea2dedcaf5a89f2696ae4ed7d24200cf662d2e /Modules/CMakeDetermineFortranCompiler.cmake | |
parent | 0d916d4e7236b227d3098de3f7d975300b1742cd (diff) | |
download | CMake-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.cmake | 9 |
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) |