diff options
Diffstat (limited to 'Source/cmListFileCache.cxx')
-rw-r--r-- | Source/cmListFileCache.cxx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 4d7e1e2..4689f42 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -9,10 +9,10 @@ #include "cmSystemTools.h" #include "cmake.h" -#include <algorithm> #include <assert.h> #include <memory> #include <sstream> +#include <utility> cmCommandContext::cmCommandName& cmCommandContext::cmCommandName::operator=( std::string const& name) @@ -474,3 +474,21 @@ bool operator!=(const cmListFileContext& lhs, const cmListFileContext& rhs) { return !(lhs == rhs); } + +std::ostream& operator<<(std::ostream& os, BT<std::string> const& s) +{ + return os << s.Value; +} + +std::vector<BT<std::string>> ExpandListWithBacktrace( + std::string const& 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; +} |