diff options
author | Brad King <brad.king@kitware.com> | 2009-11-19 22:42:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-11-19 22:42:48 (GMT) |
commit | 1699836b0632b5a16ceac7cfdcc76e0d753e0880 (patch) | |
tree | c1190d98166eccaa041ba49f6417032c7bdcb7ba /Modules/FortranCInterface | |
parent | 7c9e5ba37fba0e059642e0cf5ced61b15af20623 (diff) | |
download | CMake-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')
-rw-r--r-- | Modules/FortranCInterface/Detect.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake index 70dbe27..0f964a9 100644 --- a/Modules/FortranCInterface/Detect.cmake +++ b/Modules/FortranCInterface/Detect.cmake @@ -39,6 +39,9 @@ try_compile(FortranCInterface_COMPILED ${FortranCInterface_BINARY_DIR} ${FortranCInterface_SOURCE_DIR} FortranCInterface + CMAKE_FLAGS + "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}" + "-DCMAKE_Fortran_FLAGS=${CMAKE_Fortran_FLAGS}" OUTPUT_VARIABLE FortranCInterface_OUTPUT) set(FortranCInterface_COMPILED ${FortranCInterface_COMPILED}) unset(FortranCInterface_COMPILED CACHE) |