cmake --list-presets: List package as a valid option

This commit is contained in:
Kyle Edwards 2022-09-15 14:50:55 -04:00
parent 01a25d72c6
commit e7087308ce
4 changed files with 6 additions and 1 deletions

View File

@ -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;
}

View File

@ -0,0 +1 @@
1

View File

@ -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\.$

View File

@ -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)