diff options
author | Brad King <brad.king@kitware.com> | 2007-05-18 13:08:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-05-18 13:08:49 (GMT) |
commit | 8780da000ac79365a13e771a01ecac49324f2aae (patch) | |
tree | 8a8a61e1a2144a1ba28a61ebb1c6f6de5e969235 /Modules | |
parent | aee311a89dd409329375fddd357191817277df7f (diff) | |
download | CMake-8780da000ac79365a13e771a01ecac49324f2aae.zip CMake-8780da000ac79365a13e771a01ecac49324f2aae.tar.gz CMake-8780da000ac79365a13e771a01ecac49324f2aae.tar.bz2 |
BUG: If the Fortran CompilerId source fails to compile it should not be a failure. It is only expected to work for Fortran90 compilers.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 10 | ||||
-rw-r--r-- | Modules/CMakeDetermineFortranCompiler.cmake | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index b612e75..a0c0164 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -53,10 +53,12 @@ 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") + IF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL) + 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") + ENDIF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL) ELSE(CMAKE_${lang}_COMPILER_ID_RESULT) # Compilation succeeded. FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index 687bb8d..3da3c99 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -81,6 +81,7 @@ IF(NOT CMAKE_Fortran_COMPILER_ID_RUN) # 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) |