cpack: Allow -D flag to be used without separator

`cmake` and `ctest` already accept `-Dvar=value`.

Fixes: #26394
This commit is contained in:
leha-bot
2024-10-21 22:20:13 +03:00
committed by Brad King
parent 4b08b10900
commit e7371f5a18

View File

@@ -208,6 +208,7 @@ int main(int argc, char const* const* argv)
CommandArgument{ "--list-presets", CommandArgument::Values::Zero,
CommandArgument::setToTrue(listPresets) },
CommandArgument{ "-D", CommandArgument::Values::One,
CommandArgument::RequiresSeparator::No,
[&log, &definitions](const std::string& arg, cmake*,
cmMakefile*) -> bool {
std::string value = arg;