summaryrefslogtreecommitdiff
path: root/Modules/FortranCInterface.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-01 15:49:18 -0400
committerBrad King <brad.king@kitware.com>2023-05-01 15:51:21 -0400
commit967feaa435b4452ea40e56d500bffa2358251a3d (patch)
tree8da9a3fbeb9905eb93100896c40eb0ad90f49f7c /Modules/FortranCInterface.cmake
parent4dc47f82c2a3fc492d4cb94b4d96a24b9fc9cc47 (diff)
downloadcmake-967feaa435b4452ea40e56d500bffa2358251a3d.tar.gz
FortranCInterface: Reuse primary detection results in VERIFY function
Since commit 14f7a043e3 (Teach FortranCInterface to load outside results, 2009-08-24, v2.8.0~262) we support passing the detection results into `try_compile` by forwarding `FortranCInterface_BINARY_DIR`. Use this in `FortranCInterface_VERIFY` to avoid repeating detection.
Diffstat (limited to 'Modules/FortranCInterface.cmake')
-rw-r--r--Modules/FortranCInterface.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index ed8830ebcd..2c85029ed4 100644
--- a/Modules/FortranCInterface.cmake
+++ b/Modules/FortranCInterface.cmake
@@ -373,6 +373,7 @@ function(FortranCInterface_VERIFY)
"-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}"
+ "-DFortranCInterface_BINARY_DIR=${FortranCInterface_BINARY_DIR}"
${_FortranCInterface_OSX_ARCH}
${_FortranCInterface_EXE_LINKER_FLAGS}
OUTPUT_VARIABLE _output)