diff options
author | Brad King <brad.king@kitware.com> | 2019-09-18 15:51:54 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-18 15:52:14 (GMT) |
commit | 1423507a71199fd76b457ad9b215a6caca70ee58 (patch) | |
tree | 15bfb34dfcec17ba96f8a85ef71efe9010f9a8ec /Source/cmCustomCommandLines.h | |
parent | 01cce69870ec7efbb8138f5345aa7ffed8b7ac12 (diff) | |
parent | 9c45b95ddde04d8429f08fd692d53f843a02d12b (diff) | |
download | CMake-1423507a71199fd76b457ad9b215a6caca70ee58.zip CMake-1423507a71199fd76b457ad9b215a6caca70ee58.tar.gz CMake-1423507a71199fd76b457ad9b215a6caca70ee58.tar.bz2 |
Merge topic 'command-line-make-functions'
9c45b95ddd cmMakefile: Remove unused AddUtilityCommand overload
7f3ecbe7d7 cmCustomCommandLine: Provide command line make functions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3819
Diffstat (limited to 'Source/cmCustomCommandLines.h')
-rw-r--r-- | Source/cmCustomCommandLines.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/cmCustomCommandLines.h b/Source/cmCustomCommandLines.h index 35a15ba..213aeb1 100644 --- a/Source/cmCustomCommandLines.h +++ b/Source/cmCustomCommandLines.h @@ -5,25 +5,28 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include <initializer_list> #include <string> #include <vector> +#include "cm_string_view.hxx" // IWYU pragma: keep + /** Data structure to represent a single command line. */ class cmCustomCommandLine : public std::vector<std::string> { -public: - using Superclass = std::vector<std::string>; - using iterator = Superclass::iterator; - using const_iterator = Superclass::const_iterator; }; /** Data structure to represent a list of command lines. */ class cmCustomCommandLines : public std::vector<cmCustomCommandLine> { -public: - using Superclass = std::vector<cmCustomCommandLine>; - using iterator = Superclass::iterator; - using const_iterator = Superclass::const_iterator; }; +/** Return a command line from a list of command line parts. */ +cmCustomCommandLine cmMakeCommandLine( + std::initializer_list<cm::string_view> ilist); + +/** Return a command line vector with a single command line. */ +cmCustomCommandLines cmMakeSingleCommandLine( + std::initializer_list<cm::string_view> ilist); + #endif |