Browse Source

cmCommandLineArgument: trim leading empty spaces

Robert Maynard 4 years ago
parent
commit
400536c317
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Source/cmCommandLineArgument.h

+ 4 - 0
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