summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakePresetsTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-02-24 14:46:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-02-24 14:46:52 (GMT)
commite95f7aa0ed4a13e6d36b97fe5a4a3ead1faa13ab (patch)
tree167739e84a2f4d00ba9bc2cd3eb43767f7847ca3 /Tests/RunCMake/CMakePresetsTest
parent14c6a88db6ed5683688b1d9211f2466faa0e563d (diff)
parent6fa36470239a40ef81752ddea923d8618ad6eb7c (diff)
downloadCMake-e95f7aa0ed4a13e6d36b97fe5a4a3ead1faa13ab.zip
CMake-e95f7aa0ed4a13e6d36b97fe5a4a3ead1faa13ab.tar.gz
CMake-e95f7aa0ed4a13e6d36b97fe5a4a3ead1faa13ab.tar.bz2
Merge topic 'preset-flag-consistency' into release-3.20
6fa3647023 ctest: Add support for '--prefix=<prefix>' form of the argument 3357d37761 cmake: Add support for '--build --prefix=<prefix>' form of the argument 2f13fdef0a cmake: Document '--preset <preset>' form of the argument Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5849
Diffstat (limited to 'Tests/RunCMake/CMakePresetsTest')
-rw-r--r--Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake
index 6360fc2..4ffdfab 100644
--- a/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake
@@ -51,6 +51,7 @@ function(run_cmake_test_presets name CMakePresetsTest_CONFIGURE_PRESETS CMakePre
endforeach()
endif()
+ set(eq 0)
foreach(TEST_PRESET ${CMakePresetsTest_TEST_PRESETS})
if (EXISTS "${RunCMake_SOURCE_DIR}/${name}-test-${TEST_PRESET}-check.cmake")
set(RunCMake-check-file "${name}-test-${TEST_PRESET}-check.cmake")
@@ -58,8 +59,15 @@ function(run_cmake_test_presets name CMakePresetsTest_CONFIGURE_PRESETS CMakePre
set(RunCMake-check-file "check.cmake")
endif()
- run_cmake_command(${name}-test-${TEST_PRESET}
- ${CMAKE_CTEST_COMMAND} "--preset" "${TEST_PRESET}" ${ARGN})
+ if(eq)
+ run_cmake_command(${name}-test-${TEST_PRESET}
+ ${CMAKE_CTEST_COMMAND} "--preset=${TEST_PRESET}" ${ARGN})
+ set(eq 0)
+ else()
+ run_cmake_command(${name}-test-${TEST_PRESET}
+ ${CMAKE_CTEST_COMMAND} "--preset" "${TEST_PRESET}" ${ARGN})
+ set(eq 1)
+ endif()
endforeach()
endfunction()