diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2022-04-11 14:35:19 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2022-04-11 14:46:03 (GMT) |
commit | 45299a8f9bd366e7f41b938dfed6df9c3d4eac0d (patch) | |
tree | b80abe7276b24ea8ec001c743a29394f67559f66 /Tests/RunCMake/CMakePresets/RunCMakeTest.cmake | |
parent | 00677703d00f94702ef94d8dd07387c8405a3caf (diff) | |
download | CMake-45299a8f9bd366e7f41b938dfed6df9c3d4eac0d.zip CMake-45299a8f9bd366e7f41b938dfed6df9c3d4eac0d.tar.gz CMake-45299a8f9bd366e7f41b938dfed6df9c3d4eac0d.tar.bz2 |
cmake: --list=presets=[type] doesn't generate incorrect warnings
Fixes #23407
Diffstat (limited to 'Tests/RunCMake/CMakePresets/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/CMakePresets/RunCMakeTest.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake index 449132a..5867efd 100644 --- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake @@ -71,13 +71,18 @@ function(run_cmake_presets name) set(_unused_cli) endif() + set(_preset "--preset=${name}") + if(CMakePresets_NO_PRESET) + set(_preset) + endif() + set(RunCMake_TEST_COMMAND ${CMAKE_COMMAND} ${_source_args} -DRunCMake_TEST=${name} -DRunCMake_GENERATOR=${RunCMake_GENERATOR} -DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM} ${_unused_cli} - --preset=${name} + ${_preset} ${ARGN} ) run_cmake(${name}) @@ -288,7 +293,10 @@ run_cmake_presets(ListPresets --list-presets) set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/ListPresetsWorkingDir") set(RunCMake_TEST_NO_CLEAN 1) set(CMakePresets_NO_SOURCE_ARGS 1) +set(CMakePresets_NO_PRESET 1) run_cmake_presets(ListPresetsWorkingDir --list-presets) +run_cmake_presets(ListConfigurePresetsWorkingDir --list-presets=configure) +unset(CMakePresets_NO_PRESET) unset(CMakePresets_NO_SOURCE_ARGS) unset(RunCMake_TEST_NO_CLEAN) unset(RunCMake_TEST_BINARY_DIR) |