summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-10-17 20:43:13 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-10-17 20:43:13 (GMT)
commitfae62381f1f16f4119700fa7a8d6d44f1236ea90 (patch)
tree9249536f22e6c43445bfe7e143ced341f27ec00a
parenta2871e93ee7782838ae59ff91e42a2ce967e8ce0 (diff)
parent71491bbe8fd6e3ca83f9ed705c8c81f7ddaf9448 (diff)
downloadCMake-fae62381f1f16f4119700fa7a8d6d44f1236ea90.zip
CMake-fae62381f1f16f4119700fa7a8d6d44f1236ea90.tar.gz
CMake-fae62381f1f16f4119700fa7a8d6d44f1236ea90.tar.bz2
Merge topic 'FortranCInterface-verify-flags'
71491bb FortranCInterface: Pass all flags to VERIFY project (#13579)
-rw-r--r--Modules/FortranCInterface.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index aafecb4..c59e1f8 100644
--- a/Modules/FortranCInterface.cmake
+++ b/Modules/FortranCInterface.cmake
@@ -61,7 +61,7 @@
# If the check fails and QUIET is not given the function terminates
# with a FATAL_ERROR message describing the problem. The purpose of
# this check is to stop a build early for incompatible compiler
-# combinations.
+# combinations. The test is built in the Release configuration.
#
# FortranCInterface is aware of possible GLOBAL and MODULE manglings
# for many Fortran compilers, but it also provides an interface to
@@ -250,6 +250,7 @@ function(FortranCInterface_VERIFY)
message(STATUS "${_desc}")
# Build a sample project which reports symbols.
+ set(CMAKE_TRY_COMPILE_CONFIGURATION Release)
try_compile(FortranCInterface_VERIFY_${lang}_COMPILED
${FortranCInterface_BINARY_DIR}/Verify${lang}
${FortranCInterface_SOURCE_DIR}/Verify
@@ -259,6 +260,9 @@ function(FortranCInterface_VERIFY)
"-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
"-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}"
"-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"
+ "-DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE}"
+ "-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}"
+ "-DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE}"
OUTPUT_VARIABLE _output)
file(WRITE "${FortranCInterface_BINARY_DIR}/Verify${lang}/output.txt" "${_output}")