diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2022-12-06 15:46:40 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2022-12-06 18:04:31 (GMT) |
commit | 08aa516880c9b170195be2b0a00563249ce2bb82 (patch) | |
tree | c7b524edc2b886a9de4ae897fb33fd7ffc57369f /Source/cmakemain.cxx | |
parent | aeac9b4660762e0067c7fc0a8763e381b76710b3 (diff) | |
download | CMake-08aa516880c9b170195be2b0a00563249ce2bb82.zip CMake-08aa516880c9b170195be2b0a00563249ce2bb82.tar.gz CMake-08aa516880c9b170195be2b0a00563249ce2bb82.tar.bz2 |
cmake: Stop parsing after `--` when detecting script mode
Fixes #24220
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index a155787..1e02412 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -311,6 +311,11 @@ int do_cmake(int ac, char const* const* av) } return 1; // failed to parse } + // Only in script mode do we stop parsing instead + // of preferring the last mode flag provided + if (arg == "--" && workingMode == cmake::SCRIPT_MODE) { + break; + } } if (!matched) { parsedArgs.emplace_back(av[i]); |