cmComputeLinkInformation: Add AppendValues with backtraces

This commit is contained in:
Justin Goshi 2019-09-11 10:28:38 -07:00 committed by Brad King
parent b5b10c8e95
commit a209b31d0d
2 changed files with 16 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#include "cmComputeLinkDepends.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmListFileCache.h"
#include "cmLocalGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
@ -406,6 +407,18 @@ cmComputeLinkInformation::~cmComputeLinkInformation()
delete this->OrderDependentRPath;
}
void cmComputeLinkInformation::AppendValues(
std::string& result, std::vector<BT<std::string>>& values)
{
for (BT<std::string>& p : values) {
if (result.empty()) {
result.append(" ");
}
result.append(p.Value);
}
}
cmComputeLinkInformation::ItemVector const&
cmComputeLinkInformation::GetItems() const
{

View File

@ -17,6 +17,8 @@ class cmGlobalGenerator;
class cmMakefile;
class cmOrderDirectories;
class cmake;
template <typename T>
class BT;
/** \class cmComputeLinkInformation
* \brief Compute link information for a target in one configuration.
@ -43,6 +45,7 @@ public:
cmGeneratorTarget const* Target = nullptr;
};
using ItemVector = std::vector<Item>;
void AppendValues(std::string& result, std::vector<BT<std::string>>& values);
ItemVector const& GetItems() const;
std::vector<std::string> const& GetDirectories() const;
std::vector<std::string> const& GetDepends() const;