summaryrefslogtreecommitdiff
path: root/Modules/FortranCInterface.cmake
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
committerAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
commitef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (patch)
tree6501b44707b5c6a88fa5f817adee1a3ffcb0012d /Modules/FortranCInterface.cmake
parent035c7fabc3b82cbc9a346c11abe2e9462b4c0379 (diff)
downloadcmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.gz
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.bz2
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.zip
Imported Upstream version 2.8.10.2upstream/2.8.10.2
Diffstat (limited to 'Modules/FortranCInterface.cmake')
-rw-r--r--Modules/FortranCInterface.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index 2455c5f8b..c59e1f839 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
@@ -215,7 +215,7 @@ ${_desc_${macro}}
message(AUTHOR_WARNING "No FortranCInterface mangling known for ${f}")
endif()
endif()
- endforeach(f)
+ endforeach()
# Store the content.
configure_file(${FortranCInterface_SOURCE_DIR}/Macro.h.in ${FILE} @ONLY)
@@ -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}")