CMake code rely on cmList class for CMake lists management (part. 1)

This commit is contained in:
Marc Chevrier
2023-04-14 16:48:16 +02:00
parent 51b0d45d91
commit e08ba229ee
77 changed files with 374 additions and 381 deletions

View File

@@ -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);