mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
cpack: Improve errors when no preset is specified
Add a better error message and tests to verify.
This commit is contained in:
@@ -199,7 +199,8 @@ int main(int argc, char const* const* argv)
|
||||
CommandArgument::setToValue(cpackProjectPatch) },
|
||||
CommandArgument{ "--vendor", CommandArgument::Values::One,
|
||||
CommandArgument::setToValue(cpackProjectVendor) },
|
||||
CommandArgument{ "--preset", CommandArgument::Values::One,
|
||||
CommandArgument{ "--preset", "No preset specified for --preset",
|
||||
CommandArgument::Values::One,
|
||||
CommandArgument::setToValue(preset) },
|
||||
CommandArgument{ "--list-presets", CommandArgument::Values::Zero,
|
||||
CommandArgument::setToTrue(listPresets) },
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
^CMake Error: No preset specified for --preset$
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
^CMake Error: No preset specified for --preset$
|
||||
@@ -100,3 +100,6 @@ endfunction()
|
||||
run_cmake_package_presets(UnsupportedVersion "x" "" "")
|
||||
run_cmake_package_presets(Good "default" "build-default-debug" "no-environment;with-environment;generators;configurations;variables;config-file;debug;verbose;package-name;package-version;package-directory;vendor-name")
|
||||
run_cmake_package_presets(ListPresets "default" "" "x" "--list-presets")
|
||||
|
||||
run_cmake_command(PresetsNoArg-package ${CMAKE_CPACK_COMMAND} "--preset")
|
||||
run_cmake_command(PresetsNoArgEq-package ${CMAKE_CPACK_COMMAND} "--preset=")
|
||||
|
||||
Reference in New Issue
Block a user