mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 21:59:54 -06:00
CMake code rely on cmList class for CMake lists management (part. 1)
This commit is contained in:
@@ -121,35 +121,6 @@ void cmExpandLists(InputIt first, InputIt last,
|
||||
cmList::append(first, last, argsOut);
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as cmExpandList but a new vector is created containing
|
||||
* the expanded arguments from the string @a arg.
|
||||
*/
|
||||
std::vector<std::string> cmExpandedList(cm::string_view arg,
|
||||
bool emptyArgs = false);
|
||||
inline std::vector<std::string> cmExpandedList(cmValue arg,
|
||||
bool emptyArgs = false)
|
||||
{
|
||||
if (!arg) {
|
||||
return {};
|
||||
}
|
||||
return cmExpandedList(*arg, emptyArgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as cmExpandList but a new vector is created containing the expanded
|
||||
* versions of all arguments in the string range [@a first, @a last).
|
||||
*/
|
||||
template <class InputIt>
|
||||
std::vector<std::string> cmExpandedLists(InputIt first, InputIt last)
|
||||
{
|
||||
std::vector<std::string> argsOut;
|
||||
for (; first != last; ++first) {
|
||||
cmExpandList(*first, argsOut);
|
||||
}
|
||||
return argsOut;
|
||||
}
|
||||
|
||||
/** Concatenate string pieces into a single string. */
|
||||
std::string cmCatViews(
|
||||
std::initializer_list<std::pair<cm::string_view, std::string*>> views);
|
||||
|
||||
Reference in New Issue
Block a user