diff options
author | Brad King <brad.king@kitware.com> | 2022-06-28 20:25:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-07-05 20:35:01 (GMT) |
commit | 2873f41bd9f3636f53abf9c31a0b7492366c5199 (patch) | |
tree | 673696739fc116262eaba782946e610af51b8020 /Source/cmFileCommand.cxx | |
parent | 1ee5a4a548c62e5c382f3497be82aac36a99e485 (diff) | |
download | CMake-2873f41bd9f3636f53abf9c31a0b7492366c5199.zip CMake-2873f41bd9f3636f53abf9c31a0b7492366c5199.tar.gz CMake-2873f41bd9f3636f53abf9c31a0b7492366c5199.tar.bz2 |
cmArgumentParser: Require callers to consider unparsed arguments
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 6013bf8..aa3334f 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -172,7 +172,8 @@ bool HandleReadCommand(std::vector<std::string> const& args, .Bind("LIMIT"_s, &Arguments::Limit) .Bind("HEX"_s, &Arguments::Hex); - Arguments const arguments = parser.Parse(cmMakeRange(args).advance(3)); + Arguments const arguments = parser.Parse(cmMakeRange(args).advance(3), + /*unparsedArguments=*/nullptr); std::string fileName = fileNameArg; if (!cmsys::SystemTools::FileIsFullPath(fileName)) { @@ -1197,7 +1198,8 @@ bool HandleReadElfCommand(std::vector<std::string> const& args, .Bind("RPATH"_s, &Arguments::RPath) .Bind("RUNPATH"_s, &Arguments::RunPath) .Bind("CAPTURE_ERROR"_s, &Arguments::Error); - Arguments const arguments = parser.Parse(cmMakeRange(args).advance(2)); + Arguments const arguments = parser.Parse(cmMakeRange(args).advance(2), + /*unparsedArguments=*/nullptr); if (!cmSystemTools::FileExists(fileNameArg, true)) { status.SetError(cmStrCat("READ_ELF given FILE \"", fileNameArg, |