summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-04-12 12:15:54 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-04-12 12:16:01 (GMT)
commit8e4af2cb303ee41fa82890d6e3e6b49ccd5aeb1a (patch)
tree188957e719bffdc163ae6f1985a82630e87631e0 /Source/cmakemain.cxx
parent721aea1eba0d14c11da04118bb1c9ed9e5eef1de (diff)
parent45299a8f9bd366e7f41b938dfed6df9c3d4eac0d (diff)
downloadCMake-8e4af2cb303ee41fa82890d6e3e6b49ccd5aeb1a.zip
CMake-8e4af2cb303ee41fa82890d6e3e6b49ccd5aeb1a.tar.gz
CMake-8e4af2cb303ee41fa82890d6e3e6b49ccd5aeb1a.tar.bz2
Merge topic 'correct_list-presets_parsing'
45299a8f9b cmake: --list=presets=[type] doesn't generate incorrect warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7164
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 96bf845..28be166 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -308,10 +308,11 @@ int do_cmake(int ac, char const* const* av)
parsedArgs.emplace_back("--find-package");
return true;
} },
- CommandArgument{ "--list-presets", CommandArgument::Values::Zero,
- [&](std::string const&) -> bool {
+ CommandArgument{ "--list-presets", CommandArgument::Values::ZeroOrOne,
+ [&](std::string const& value) -> bool {
workingMode = cmake::HELP_MODE;
parsedArgs.emplace_back("--list-presets");
+ parsedArgs.emplace_back(value);
return true;
} },
};