diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2021-05-12 13:43:33 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2021-05-12 13:43:33 (GMT) |
commit | 928cdb17c53f2fc5e57d658f297ec735ab8cb81d (patch) | |
tree | 7f05bf9f466155ddf991fac92151f36e6162df33 /Source/cmCommandLineArgument.h | |
parent | 1ad4501ae97fb6c6deab096ff0ac7e03d554e26d (diff) | |
download | CMake-928cdb17c53f2fc5e57d658f297ec735ab8cb81d.zip CMake-928cdb17c53f2fc5e57d658f297ec735ab8cb81d.tar.gz CMake-928cdb17c53f2fc5e57d658f297ec735ab8cb81d.tar.bz2 |
cmCommandLineArgument: Correctly record parsing failures
Diffstat (limited to 'Source/cmCommandLineArgument.h')
-rw-r--r-- | Source/cmCommandLineArgument.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/cmCommandLineArgument.h b/Source/cmCommandLineArgument.h index 495dc69..f4153fc 100644 --- a/Source/cmCommandLineArgument.h +++ b/Source/cmCommandLineArgument.h @@ -98,17 +98,11 @@ struct cmCommandLineArgument // parse the string to get the value auto possible_value = cm::string_view(input).substr(this->Name.size()); if (possible_value.empty()) { - parseState = ParseMode::SyntaxError; parseState = ParseMode::ValueError; } else if (possible_value[0] == '=') { possible_value.remove_prefix(1); if (possible_value.empty()) { parseState = ParseMode::ValueError; - } else { - parseState = this->StoreCall(std::string(possible_value), - std::forward<CallState>(state)...) - ? ParseMode::Valid - : ParseMode::Invalid; } } if (parseState == ParseMode::Valid) { @@ -150,6 +144,8 @@ struct cmCommandLineArgument : ParseMode::Invalid; index = (nextValueIndex - 1); } + } else { + parseState = ParseMode::SyntaxError; } } |