summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-07-21 13:52:28 (GMT)
committerBrad King <brad.king@kitware.com>2022-07-22 18:30:21 (GMT)
commit14a0e750cb33f09faf01134c420483d358d0fae8 (patch)
tree183b4de6a38b912fff56947ef25eb783320ccf92 /Source
parentfebe3190f0782d3c2efdd4115e563632ec8b41b7 (diff)
downloadCMake-14a0e750cb33f09faf01134c420483d358d0fae8.zip
CMake-14a0e750cb33f09faf01134c420483d358d0fae8.tar.gz
CMake-14a0e750cb33f09faf01134c420483d358d0fae8.tar.bz2
cmake: In -P mode ignore flags like `--version` after `--`
Fixes: #21031
Diffstat (limited to 'Source')
-rw-r--r--Source/cmakemain.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 97c275e..f931e9d 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -207,7 +207,7 @@ int do_cmake(int ac, char const* const* av)
#ifndef CMAKE_BOOTSTRAP
cmDocumentation doc;
doc.addCMakeStandardDocSections();
- if (doc.CheckOptions(ac, av)) {
+ if (doc.CheckOptions(ac, av, "--")) {
// Construct and print requested documentation.
cmake hcm(cmake::RoleInternal, cmState::Unknown);
hcm.SetHomeDirectory("");