summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FortranCInterface.cmake6
-rw-r--r--Modules/FortranCInterface/Detect.cmake4
-rw-r--r--Tests/FortranC/CMakeLists.txt4
3 files changed, 7 insertions, 7 deletions
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index 812e319..a7d5571 100644
--- a/Modules/FortranCInterface.cmake
+++ b/Modules/FortranCInterface.cmake
@@ -248,9 +248,9 @@ function(FortranCInterface_VERIFY)
VerifyFortranC
CMAKE_FLAGS -DVERIFY_CXX=${verify_cxx}
-DCMAKE_VERBOSE_MAKEFILE=ON
- "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}"
- "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}"
- "-DCMAKE_Fortran_FLAGS=${CMAKE_Fortran_FLAGS}"
+ "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
+ "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}"
+ "-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"
OUTPUT_VARIABLE _output)
file(WRITE "${FortranCInterface_BINARY_DIR}/Verify${lang}/output.txt" "${_output}")
diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake
index 0f964a9..2ea43d1 100644
--- a/Modules/FortranCInterface/Detect.cmake
+++ b/Modules/FortranCInterface/Detect.cmake
@@ -40,8 +40,8 @@ try_compile(FortranCInterface_COMPILED
${FortranCInterface_SOURCE_DIR}
FortranCInterface
CMAKE_FLAGS
- "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}"
- "-DCMAKE_Fortran_FLAGS=${CMAKE_Fortran_FLAGS}"
+ "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
+ "-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"
OUTPUT_VARIABLE FortranCInterface_OUTPUT)
set(FortranCInterface_COMPILED ${FortranCInterface_COMPILED})
unset(FortranCInterface_COMPILED CACHE)
diff --git a/Tests/FortranC/CMakeLists.txt b/Tests/FortranC/CMakeLists.txt
index e4e8ca1..12d4165 100644
--- a/Tests/FortranC/CMakeLists.txt
+++ b/Tests/FortranC/CMakeLists.txt
@@ -13,11 +13,11 @@ file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/CMakeFiles/FortranCInterface)
if(FortranC_TEST_FLAGS)
# Test whether FortranCInterface checks see C flags.
- set(ENV{TEST_OPT_CC} "--test-opt-cc")
+ set(ENV{TEST_OPT_CC} "--test-opt-cc=1")
set(CMAKE_C_FLAGS "$ENV{TEST_OPT_CC}")
# Test whether FortranCInterface checks see Fortran flags.
- set(ENV{TEST_OPT_FC} "--test-opt-fc")
+ set(ENV{TEST_OPT_FC} "--test-opt-fc=1")
set(CMAKE_Fortran_FLAGS "$ENV{TEST_OPT_FC}")
endif()