summaryrefslogtreecommitdiffstats
path: root/Modules/FortranCInterface.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-11-19 22:42:48 (GMT)
committerBrad King <brad.king@kitware.com>2009-11-19 22:42:48 (GMT)
commit1699836b0632b5a16ceac7cfdcc76e0d753e0880 (patch)
treec1190d98166eccaa041ba49f6417032c7bdcb7ba /Modules/FortranCInterface.cmake
parent7c9e5ba37fba0e059642e0cf5ced61b15af20623 (diff)
downloadCMake-1699836b0632b5a16ceac7cfdcc76e0d753e0880.zip
CMake-1699836b0632b5a16ceac7cfdcc76e0d753e0880.tar.gz
CMake-1699836b0632b5a16ceac7cfdcc76e0d753e0880.tar.bz2
FortranCInterface: Honor language flags in checks
We pass CMAKE_C_FLAGS, CMAKE_CXX_FLAGS, and CMAKE_Fortran_FLAGS through try_compile() for the FortranCInterface Detect and Verify projects. This honors user-specified compiler flags for each language, thus supporting flags that affect the Fortran mangling.
Diffstat (limited to 'Modules/FortranCInterface.cmake')
-rw-r--r--Modules/FortranCInterface.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index a2ef08e..812e319 100644
--- a/Modules/FortranCInterface.cmake
+++ b/Modules/FortranCInterface.cmake
@@ -248,6 +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}"
OUTPUT_VARIABLE _output)
file(WRITE "${FortranCInterface_BINARY_DIR}/Verify${lang}/output.txt" "${_output}")