diff options
author | Brad King <brad.king@kitware.com> | 2022-07-06 15:30:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-07-07 13:48:58 (GMT) |
commit | e6d1e29ffa6bd3141a769d1281f3407ed0774139 (patch) | |
tree | 667e168e1643d72da6c88433c3c71a26c4fdcb0e /Source/cmTargetSourcesCommand.cxx | |
parent | 4c50f639c7e67098eba14bc41869dd5c354d0da6 (diff) | |
download | CMake-e6d1e29ffa6bd3141a769d1281f3407ed0774139.zip CMake-e6d1e29ffa6bd3141a769d1281f3407ed0774139.tar.gz CMake-e6d1e29ffa6bd3141a769d1281f3407ed0774139.tar.bz2 |
cmArgumentParser: Model maybe-empty and non-empty lists with wrapper types
Previously bindings to `std::vector<std::string>` required at least one
value. Some clients have been filtering `keywordsMissingValue` to
support keywords followed by empty lists. Instead, require clients to
specify whether a keyword's list can be empty as part of the binding
type.
Diffstat (limited to 'Source/cmTargetSourcesCommand.cxx')
-rw-r--r-- | Source/cmTargetSourcesCommand.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmTargetSourcesCommand.cxx b/Source/cmTargetSourcesCommand.cxx index 74945fa..e2b0213 100644 --- a/Source/cmTargetSourcesCommand.cxx +++ b/Source/cmTargetSourcesCommand.cxx @@ -9,6 +9,7 @@ #include <cmext/string_view> #include "cmArgumentParser.h" +#include "cmArgumentParserTypes.h" #include "cmExperimental.h" #include "cmFileSet.h" #include "cmGeneratorExpression.h" @@ -28,8 +29,8 @@ struct FileSetArgs { std::string Type; std::string FileSet; - std::vector<std::string> BaseDirs; - std::vector<std::string> Files; + ArgumentParser::MaybeEmpty<std::vector<std::string>> BaseDirs; + ArgumentParser::MaybeEmpty<std::vector<std::string>> Files; }; auto const FileSetArgsParser = cmArgumentParser<FileSetArgs>() |