mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-04 04:03:22 +03:00
cmListFileCache: Add ExpandListWithBacktrace helper
This commit is contained in:
1 parent
f1dd0eeaaf
commit
e022e2d873
2 files changed
+16
No files matched your search
@@ -479,3 +479,16 @@ std::ostream& operator<<(std::ostream& os, BT<std::string> const& s)
|
||||
{
|
||||
return os << s.Value;
|
||||
}
|
||||
|
||||
std::vector<BT<std::string>> ExpandListWithBacktrace(
|
||||
const char* list, cmListFileBacktrace const& bt)
|
||||
{
|
||||
std::vector<BT<std::string>> result;
|
||||
std::vector<std::string> tmp;
|
||||
cmSystemTools::ExpandListArgument(list, tmp);
|
||||
result.reserve(tmp.size());
|
||||
for (std::string& i : tmp) {
|
||||
result.emplace_back(std::move(i), bt);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -198,6 +198,9 @@ public:
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, BT<std::string> const& s);
|
||||
|
||||
std::vector<BT<std::string>> ExpandListWithBacktrace(
|
||||
const char* list, cmListFileBacktrace const& bt = cmListFileBacktrace());
|
||||
|
||||
struct cmListFile
|
||||
{
|
||||
bool ParseFile(const char* path, cmMessenger* messenger,
|
||||
|
||||
Reference in new issue
Block a user