diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2022-09-16 13:50:53 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-09-16 13:51:13 (GMT) |
commit | a638dff7b3d8d7b34bb4c2549f0104cad013cba9 (patch) | |
tree | c05f449362729f8fade9714590efec1265d4ff14 | |
parent | cabba23ab270eb5cc672c43265f9eb3cb7dda8cc (diff) | |
parent | e7087308ce9cc529e233489a4cec4c4cd7ece51a (diff) | |
download | CMake-a638dff7b3d8d7b34bb4c2549f0104cad013cba9.zip CMake-a638dff7b3d8d7b34bb4c2549f0104cad013cba9.tar.gz CMake-a638dff7b3d8d7b34bb4c2549f0104cad013cba9.tar.bz2 |
Merge topic 'cmake-presets-list-error-message'
e7087308ce cmake --list-presets: List package as a valid option
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7684
-rw-r--r-- | Source/cmake.cxx | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CMakePresets/ListPresetsInvalidType-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMakePresets/ListPresetsInvalidType-stderr.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CMakePresets/RunCMakeTest.cmake | 1 |
4 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 281e63f..3b105e3 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1145,7 +1145,7 @@ void cmake::SetArgs(const std::vector<std::string>& args) } else { cmSystemTools::Error( "Invalid value specified for --list-presets.\n" - "Valid values are configure, build, test, or all. " + "Valid values are configure, build, test, package, or all. " "When no value is passed the default is configure."); return false; } diff --git a/Tests/RunCMake/CMakePresets/ListPresetsInvalidType-result.txt b/Tests/RunCMake/CMakePresets/ListPresetsInvalidType-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMakePresets/ListPresetsInvalidType-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMakePresets/ListPresetsInvalidType-stderr.txt b/Tests/RunCMake/CMakePresets/ListPresetsInvalidType-stderr.txt new file mode 100644 index 0000000..153abee --- /dev/null +++ b/Tests/RunCMake/CMakePresets/ListPresetsInvalidType-stderr.txt @@ -0,0 +1,3 @@ +^CMake Error: Invalid value specified for --list-presets\. +Valid values are configure, build, test, package, or all\. When no value is passed the default is configure\. +CMake Error: Run 'cmake --help' for all supported options\.$ diff --git a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake index c511b34..4f57e2f 100644 --- a/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePresets/RunCMakeTest.cmake @@ -289,6 +289,7 @@ run_cmake_presets(UserInheritance) # Test listing presets set(CMakePresets_FILE "${RunCMake_SOURCE_DIR}/ListPresets.json.in") run_cmake_presets(ListPresets --list-presets) +run_cmake_presets(ListPresetsInvalidType --list-presets=invalid-type) set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/ListPresetsWorkingDir") set(RunCMake_TEST_NO_CLEAN 1) |