summaryrefslogtreecommitdiff
path: root/Modules/CMakeTestOBJCCompiler.cmake
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2022-09-13 10:07:56 -0400
committerBrad King <brad.king@kitware.com>2022-09-14 07:52:16 -0400
commit2edf0fc6d73510f4e93e2750bc0dbc8c6c376633 (patch)
treec7d5a791ae4cce38b9dd68e07deeaf2486b83455 /Modules/CMakeTestOBJCCompiler.cmake
parent83686df1d63e7d2c922de19489ea2bab42e98a4a (diff)
downloadcmake-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/CMakeTestOBJCCompiler.cmake')
-rw-r--r--Modules/CMakeTestOBJCCompiler.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeTestOBJCCompiler.cmake b/Modules/CMakeTestOBJCCompiler.cmake
index 20d1f8be93..a8e63198b2 100644
--- a/Modules/CMakeTestOBJCCompiler.cmake
+++ b/Modules/CMakeTestOBJCCompiler.cmake
@@ -50,8 +50,8 @@ if(NOT CMAKE_OBJC_COMPILER_WORKS)
# Clear result from normal variable.
unset(CMAKE_OBJC_COMPILER_WORKS)
# Puts test result in cache variable.
- try_compile(CMAKE_OBJC_COMPILER_WORKS ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testOBJCCompiler.m
+ try_compile(CMAKE_OBJC_COMPILER_WORKS
+ SOURCES ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testOBJCCompiler.m
OUTPUT_VARIABLE __CMAKE_OBJC_COMPILER_OUTPUT)
# Move result from cache to normal variable.
set(CMAKE_OBJC_COMPILER_WORKS ${CMAKE_OBJC_COMPILER_WORKS})