diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2022-09-13 10:07:56 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-14 07:52:16 -0400 |
commit | 2edf0fc6d73510f4e93e2750bc0dbc8c6c376633 (patch) | |
tree | c7d5a791ae4cce38b9dd68e07deeaf2486b83455 /Modules/CMakeDetermineVSServicePack.cmake | |
parent | 83686df1d63e7d2c922de19489ea2bab42e98a4a (diff) | |
download | cmake-2edf0fc6d73510f4e93e2750bc0dbc8c6c376633.tar.gz |
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/CMakeDetermineVSServicePack.cmake')
-rw-r--r-- | Modules/CMakeDetermineVSServicePack.cmake | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/CMakeDetermineVSServicePack.cmake b/Modules/CMakeDetermineVSServicePack.cmake index 53868d21aa..0d360b5314 100644 --- a/Modules/CMakeDetermineVSServicePack.cmake +++ b/Modules/CMakeDetermineVSServicePack.cmake @@ -105,8 +105,7 @@ function(_DetermineVSServicePack_CheckVersionWithTryCompile _SUCCESS_VAR _VERSI try_compile( _CompileResult - "${CMAKE_BINARY_DIR}" - "${CMAKE_BINARY_DIR}/return0.cc" + SOURCES "${CMAKE_BINARY_DIR}/return0.cc" OUTPUT_VARIABLE _output COPY_FILE "${CMAKE_BINARY_DIR}/return0.cc") @@ -128,8 +127,7 @@ function(_DetermineVSServicePack_CheckVersionWithTryRun _SUCCESS_VAR _VERSION_V try_run( _RunResult _CompileResult - "${CMAKE_BINARY_DIR}" - "${CMAKE_BINARY_DIR}/return0.cc" + SOURCES "${CMAKE_BINARY_DIR}/return0.cc" RUN_OUTPUT_VARIABLE _runoutput ) |