summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-02-05 15:48:20 (GMT)
committerBrad King <brad.king@kitware.com>2016-02-05 15:49:08 (GMT)
commitd31d7ffd1e59c9fe2a108726d2d9d78adf90ca11 (patch)
tree7972b0a5d40be8a422811db888adfbe985a7a4d2
parent5ee00b71e94f5daa985b8453ae67b125ea0983d9 (diff)
downloadCMake-d31d7ffd1e59c9fe2a108726d2d9d78adf90ca11.zip
CMake-d31d7ffd1e59c9fe2a108726d2d9d78adf90ca11.tar.gz
CMake-d31d7ffd1e59c9fe2a108726d2d9d78adf90ca11.tar.bz2
Tests: Fix Fortran test to run FortranCInterface again
Updates to Tests/Fortran by commit v3.2.0-rc1~501^2 (Avoid if() quoted auto-dereference, 2014-10-14) changed our check "${CMAKE_Fortran_COMPILER_ID}" MATCHES "${CMAKE_C_COMPILER_ID}" to CMAKE_Fortran_COMPILER_ID MATCHES CMAKE_C_COMPILER_ID because CMP0054 warned about the LHS compiler id "MSVC" being expanded. However, the RHS of if(MATCHES) does not auto-dereference so this check has returned FALSE since then and the FortranCInterface part of the test has not been running! Fix this by using STREQUAL with quoted arguments and setting CMP0054 to NEW (by requiring 3.1).
-rw-r--r--Tests/Fortran/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 753ce27..51e971b 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.0)
+cmake_minimum_required (VERSION 3.1)
project(testf C CXX Fortran)
if(NOT DEFINED CMake_TEST_NESTED_MAKE_PROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
set(CMake_TEST_NESTED_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM}")
@@ -119,7 +119,7 @@ endfunction()
# call the test_fortran_c_interface_module function
if("${CMAKE_Fortran_COMPILER_ID}:${CMAKE_C_COMPILER_ID}" MATCHES
"(Intel:MSVC|Absoft:GNU)"
- OR (CMAKE_Fortran_COMPILER_ID MATCHES CMAKE_C_COMPILER_ID ))
+ OR ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "${CMAKE_C_COMPILER_ID}" ))
test_fortran_c_interface_module()
else()
message("Fortran does not match c compiler")