diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-04-25 17:54:23 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-04-29 07:54:31 (GMT) |
commit | 241304190ffdf9cc7d4ede0601da370b111468cc (patch) | |
tree | e35dd7fe5c89da1eed3abe10f37abe3586e64df7 /Source/cmList.h | |
parent | 87fe031a0703f07b8636f8ea59b6746788e71869 (diff) | |
download | CMake-241304190ffdf9cc7d4ede0601da370b111468cc.zip CMake-241304190ffdf9cc7d4ede0601da370b111468cc.tar.gz CMake-241304190ffdf9cc7d4ede0601da370b111468cc.tar.bz2 |
CMake code rely on cmList class for CMake lists management (part. 2)
Diffstat (limited to 'Source/cmList.h')
-rw-r--r-- | Source/cmList.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmList.h b/Source/cmList.h index 26bf42e..d9ce951 100644 --- a/Source/cmList.h +++ b/Source/cmList.h @@ -24,6 +24,8 @@ /** * CMake lists management + * A CMake list is a string where list elements are separated by the ';' + * character. * * For all operations, input arguments (single value like cm::string_view or * multiple values specified through pair of iterators) are, by default, @@ -1331,3 +1333,20 @@ void append(cmList& v, Range const& r) #endif } // namespace cm + +/** + * Helper functions for legacy support. Use preferably cmList class directly + * or the static methods of the class. + */ +inline void cmExpandList( + cm::string_view arg, std::vector<std::string>& argsOut, + cmList::EmptyElements emptyElements = cmList::EmptyElements::No) +{ + cmList::append(argsOut, arg, emptyElements); +} +inline void cmExpandList( + cmValue arg, std::vector<std::string>& argsOut, + cmList::EmptyElements emptyElements = cmList::EmptyElements::No) +{ + cmList::append(argsOut, arg, emptyElements); +} |