summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-15 13:06:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-09-15 13:07:04 (GMT)
commitb178311c639131eb94d2d65f57572d0afee9ecf8 (patch)
tree2f2094ca4e6b43b42e83053a40cd3e1f40efd9a8
parent89ef919263db5ef27f73ebe3fa57fb236d6ee1b0 (diff)
parent4ecbf1f938cf1ed4efc2032fe07e8016993d4122 (diff)
downloadCMake-b178311c639131eb94d2d65f57572d0afee9ecf8.zip
CMake-b178311c639131eb94d2d65f57572d0afee9ecf8.tar.gz
CMake-b178311c639131eb94d2d65f57572d0afee9ecf8.tar.bz2
Merge topic 'fix-try_compile-tests'
4ecbf1f938 Tests: Fix recently added tests Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7678
-rw-r--r--Tests/RunCMake/try_compile/BuildType.cmake4
-rw-r--r--Tests/RunCMake/try_compile/BuildTypeAsFlag.cmake4
-rw-r--r--Tests/RunCMake/try_compile/OutputDirAsFlag.cmake4
3 files changed, 9 insertions, 3 deletions
diff --git a/Tests/RunCMake/try_compile/BuildType.cmake b/Tests/RunCMake/try_compile/BuildType.cmake
index f2709f8..8d7e3be 100644
--- a/Tests/RunCMake/try_compile/BuildType.cmake
+++ b/Tests/RunCMake/try_compile/BuildType.cmake
@@ -1,6 +1,8 @@
enable_language(C)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
-try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS})
+try_compile(RESULT
+ ${try_compile_bindir_or_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
COPY_FILE "${CMAKE_CURRENT_BINARY_DIR}/out.bin"
)
diff --git a/Tests/RunCMake/try_compile/BuildTypeAsFlag.cmake b/Tests/RunCMake/try_compile/BuildTypeAsFlag.cmake
index e9384c7..a822156 100644
--- a/Tests/RunCMake/try_compile/BuildTypeAsFlag.cmake
+++ b/Tests/RunCMake/try_compile/BuildTypeAsFlag.cmake
@@ -1,7 +1,9 @@
enable_language(C)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
-try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS})
+try_compile(RESULT
+ ${try_compile_bindir_or_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
COPY_FILE "${CMAKE_CURRENT_BINARY_DIR}/out.bin"
CMAKE_FLAGS "-DCMAKE_BUILD_TYPE=Release"
)
diff --git a/Tests/RunCMake/try_compile/OutputDirAsFlag.cmake b/Tests/RunCMake/try_compile/OutputDirAsFlag.cmake
index 5c4dca5..1214bbb 100644
--- a/Tests/RunCMake/try_compile/OutputDirAsFlag.cmake
+++ b/Tests/RunCMake/try_compile/OutputDirAsFlag.cmake
@@ -1,7 +1,9 @@
enable_language(C)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
-try_compile(RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
+include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS})
+try_compile(RESULT
+ ${try_compile_bindir_or_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
COPY_FILE "${CMAKE_CURRENT_BINARY_DIR}/out.bin"
CMAKE_FLAGS "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=bin"
)