summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2011-12-16 23:20:46 (GMT)
committerBrad King <brad.king@kitware.com>2012-02-09 13:36:27 (GMT)
commit067c1f44a80ed8fb32e56918a57437142c64b049 (patch)
tree2b1a9e2c45a684c0830a0692903ee676ade7aa8e
parentbd69e1c567cc4fc1bf30d321d888dd2567d82e7a (diff)
downloadCMake-067c1f44a80ed8fb32e56918a57437142c64b049.zip
CMake-067c1f44a80ed8fb32e56918a57437142c64b049.tar.gz
CMake-067c1f44a80ed8fb32e56918a57437142c64b049.tar.bz2
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.
-rw-r--r--Tests/CMakeLists.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index e949887..9c97828 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -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)