diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2022-09-13 14:07:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-14 11:52:16 (GMT) |
commit | 2edf0fc6d73510f4e93e2750bc0dbc8c6c376633 (patch) | |
tree | c7d5a791ae4cce38b9dd68e07deeaf2486b83455 /Modules/FindMPI.cmake | |
parent | 83686df1d63e7d2c922de19489ea2bab42e98a4a (diff) | |
download | CMake-2edf0fc6d73510f4e93e2750bc0dbc8c6c376633.zip CMake-2edf0fc6d73510f4e93e2750bc0dbc8c6c376633.tar.gz CMake-2edf0fc6d73510f4e93e2750bc0dbc8c6c376633.tar.bz2 |
Modules: Use new keyword-dispatched try_compile signature
Modify most of the modules that ship with CMake to use the new
try_compile / try_run signatures added by commit aa9220d3a0
(try_compile: Add keyword-dispatched signature, 2022-09-02). This
improves debugging by each invocation using its own directory so that
the results of multiple invocations can be retained.
This does not cover any invocations which provide an entire project, as
that flavor of try_compile has not yet been updated.
Diffstat (limited to 'Modules/FindMPI.cmake')
-rw-r--r-- | Modules/FindMPI.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index bca0c10..a96fadd 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -1259,7 +1259,7 @@ function(_MPI_try_staged_settings LANG MPI_TEST_FILE_NAME MODE RUN_BINARY SUPPRE endif() if(RUN_BINARY) try_run(MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} - "${CMAKE_BINARY_DIR}" SOURCES "${MPI_TEST_SOURCE_FILE}" + SOURCES "${MPI_TEST_SOURCE_FILE}" COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} LINK_LIBRARIES MPI::MPI_${LANG} RUN_OUTPUT_VARIABLE MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} @@ -1267,7 +1267,7 @@ function(_MPI_try_staged_settings LANG MPI_TEST_FILE_NAME MODE RUN_BINARY SUPPRE set(MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} "${MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}}" PARENT_SCOPE) else() try_compile(MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} - "${CMAKE_BINARY_DIR}" SOURCES "${MPI_TEST_SOURCE_FILE}" + SOURCES "${MPI_TEST_SOURCE_FILE}" COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} LINK_LIBRARIES MPI::MPI_${LANG} COPY_FILE "${BIN_FILE}" |