summaryrefslogtreecommitdiffstats
path: root/Source/cmCommandLineArgument.h
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2021-03-09 19:35:49 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2021-03-09 19:35:49 (GMT)
commit400536c3179ddbfedd28dc4739d1b1cd785d02b4 (patch)
tree174d939f79dc9f9e15fba57e54b77e5a26add00f /Source/cmCommandLineArgument.h
parentb227a9565eb06dcc6e59bfa31e6939edf1ddbaad (diff)
downloadCMake-400536c3179ddbfedd28dc4739d1b1cd785d02b4.zip
CMake-400536c3179ddbfedd28dc4739d1b1cd785d02b4.tar.gz
CMake-400536c3179ddbfedd28dc4739d1b1cd785d02b4.tar.bz2
cmCommandLineArgument: trim leading empty spaces
Diffstat (limited to 'Source/cmCommandLineArgument.h')
-rw-r--r--Source/cmCommandLineArgument.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmCommandLineArgument.h b/Source/cmCommandLineArgument.h
index cbedf0a..6b75da0 100644
--- a/Source/cmCommandLineArgument.h
+++ b/Source/cmCommandLineArgument.h
@@ -110,6 +110,10 @@ struct cmCommandLineArgument
}
}
if (parseState == ParseMode::Valid) {
+ if (possible_value[0] == ' ') {
+ possible_value.remove_prefix(1);
+ }
+
parseState = this->StoreCall(std::string(possible_value),
std::forward<CallState>(state)...)
? ParseMode::Valid