VSGNUFortran: Disable test in special cases

The ifort compiler found on some test machines does not support Mac
universal binaries or the Linux Standard Base.
This commit is contained in:
Bill Hoffman 2011-12-16 18:20:46 -05:00 committed by Brad King
parent bd69e1c567
commit 067c1f44a8
1 changed files with 18 additions and 1 deletions

View File

@ -170,7 +170,24 @@ IF(BUILD_TESTING)
# or in some cases you might need to set the PATH so that cmake can find
# the gfortran from mingw.
IF(CMAKE_Fortran_COMPILER OR CMAKE_TEST_CMAKE_ADD_FORTRAN)
ADD_TEST_MACRO(VSGNUFortran ${CMAKE_COMMAND} -P runtest.cmake)
SET(CMAKE_SKIP_VSGNUFortran FALSE)
# disable test for apple builds using ifort if they are building
# more than one architecture, as ifort does not support that.
IF(APPLE AND (CMAKE_Fortran_COMPILER MATCHES ifort))
LIST(LENGTH CMAKE_OSX_ARCHITECTURES len)
IF("${len}" GREATER 1)
MESSAGE(STATUS "Skip VSGNUFortran for ifort dual cpu mac build")
SET(CMAKE_SKIP_VSGNUFortran TRUE)
ENDIF()
ENDIF()
IF((CMAKE_C_COMPILER MATCHES lsb)
AND (CMAKE_Fortran_COMPILER MATCHES ifort))
MESSAGE(STATUS "Skip VSGNUFortran for ifort and lsb compilers")
SET(CMAKE_SKIP_VSGNUFortran TRUE)
ENDIF()
IF(NOT CMAKE_SKIP_VSGNUFortran)
ADD_TEST_MACRO(VSGNUFortran ${CMAKE_COMMAND} -P runtest.cmake)
ENDIF()
ENDIF()
ADD_TEST_MACRO(COnly COnly)
ADD_TEST_MACRO(CxxOnly CxxOnly)