Merge topic 'test-Fortran-compiler-compat'

fcb2a27 Fix and simplify Fortran test compiler compatibility check
This commit is contained in:
David Cole 2011-12-16 10:15:32 -05:00 committed by CMake Topic Stage
commit 52d5f67ec7
1 changed files with 2 additions and 10 deletions

View File

@ -113,16 +113,8 @@ endfunction()
# if the id's match or the compilers are compatible, then # if the id's match or the compilers are compatible, then
# call the test_fortran_c_interface_module function # call the test_fortran_c_interface_module function
if(("${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel") if("${CMAKE_Fortran_COMPILER_ID}:${CMAKE_C_COMPILER_ID}" MATCHES
AND "(Intel:MSVC|Absoft:GNU)"
("${CMAKE_C_COMPILER_ID}" MATCHES "MSVC")
)
set(COMPATABLE_COMPILERS TRUE)
endif()
if("${CMAKE_Fortran_COMPILER_ID}:${CMAKE_C_COMPILER_ID}" MATCHES "Absoft:GNU")
set(COMPATABLE_COMPILERS TRUE)
endif()
if(COMPATABLE_COMPILERS
OR ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "${CMAKE_C_COMPILER_ID}" )) OR ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "${CMAKE_C_COMPILER_ID}" ))
test_fortran_c_interface_module() test_fortran_c_interface_module()
else() else()