cmComputeLinkDepends: Convert AddLinkEntries to a template
Allow the method to be called with a vector of any type that can be converted to cmLinkItem.
This commit is contained in:
parent
477b07213a
commit
82e91e3487
|
@ -553,15 +553,16 @@ void cmComputeLinkDepends::AddDirectLinkEntries()
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
template <typename T>
|
||||||
void
|
void
|
||||||
cmComputeLinkDepends::AddLinkEntries(
|
cmComputeLinkDepends::AddLinkEntries(
|
||||||
int depender_index, std::vector<cmLinkItem> const& libs)
|
int depender_index, std::vector<T> const& libs)
|
||||||
{
|
{
|
||||||
// Track inferred dependency sets implied by this list.
|
// Track inferred dependency sets implied by this list.
|
||||||
std::map<int, DependSet> dependSets;
|
std::map<int, DependSet> dependSets;
|
||||||
|
|
||||||
// Loop over the libraries linked directly by the depender.
|
// Loop over the libraries linked directly by the depender.
|
||||||
for(std::vector<cmLinkItem>::const_iterator li = libs.begin();
|
for(typename std::vector<T>::const_iterator li = libs.begin();
|
||||||
li != libs.end(); ++li)
|
li != libs.end(); ++li)
|
||||||
{
|
{
|
||||||
// Skip entries that will resolve to the target getting linked or
|
// Skip entries that will resolve to the target getting linked or
|
||||||
|
|
|
@ -80,8 +80,8 @@ private:
|
||||||
int AddLinkEntry(cmLinkItem const& item);
|
int AddLinkEntry(cmLinkItem const& item);
|
||||||
void AddVarLinkEntries(int depender_index, const char* value);
|
void AddVarLinkEntries(int depender_index, const char* value);
|
||||||
void AddDirectLinkEntries();
|
void AddDirectLinkEntries();
|
||||||
void AddLinkEntries(int depender_index,
|
template <typename T>
|
||||||
std::vector<cmLinkItem> const& libs);
|
void AddLinkEntries(int depender_index, std::vector<T> const& libs);
|
||||||
cmTarget const* FindTargetToLink(int depender_index,
|
cmTarget const* FindTargetToLink(int depender_index,
|
||||||
const std::string& name);
|
const std::string& name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue