|
|
@ -15,6 +15,7 @@
|
|
|
|
#include "cmComputeLinkDepends.h"
|
|
|
|
#include "cmComputeLinkDepends.h"
|
|
|
|
#include "cmGeneratorTarget.h"
|
|
|
|
#include "cmGeneratorTarget.h"
|
|
|
|
#include "cmGlobalGenerator.h"
|
|
|
|
#include "cmGlobalGenerator.h"
|
|
|
|
|
|
|
|
#include "cmLinkItem.h"
|
|
|
|
#include "cmList.h"
|
|
|
|
#include "cmList.h"
|
|
|
|
#include "cmListFileCache.h"
|
|
|
|
#include "cmListFileCache.h"
|
|
|
|
#include "cmLocalGenerator.h"
|
|
|
|
#include "cmLocalGenerator.h"
|
|
|
@ -23,6 +24,7 @@
|
|
|
|
#include "cmOrderDirectories.h"
|
|
|
|
#include "cmOrderDirectories.h"
|
|
|
|
#include "cmPlaceholderExpander.h"
|
|
|
|
#include "cmPlaceholderExpander.h"
|
|
|
|
#include "cmPolicies.h"
|
|
|
|
#include "cmPolicies.h"
|
|
|
|
|
|
|
|
#include "cmSourceFile.h"
|
|
|
|
#include "cmState.h"
|
|
|
|
#include "cmState.h"
|
|
|
|
#include "cmStateTypes.h"
|
|
|
|
#include "cmStateTypes.h"
|
|
|
|
#include "cmStringAlgorithms.h"
|
|
|
|
#include "cmStringAlgorithms.h"
|
|
|
@ -531,6 +533,12 @@ cmComputeLinkInformation::GetObjectLibrariesLinked() const
|
|
|
|
return this->ObjectLibrariesLinked;
|
|
|
|
return this->ObjectLibrariesLinked;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const std::vector<const cmGeneratorTarget*>&
|
|
|
|
|
|
|
|
cmComputeLinkInformation::GetExternalObjectTargets() const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return this->ExternalObjectTargets;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool cmComputeLinkInformation::Compute()
|
|
|
|
bool cmComputeLinkInformation::Compute()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Skip targets that do not link or have link-like information consumers may
|
|
|
|
// Skip targets that do not link or have link-like information consumers may
|
|
|
@ -678,6 +686,9 @@ bool cmComputeLinkInformation::Compute()
|
|
|
|
this->Target->GetBacktrace());
|
|
|
|
this->Target->GetBacktrace());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Record targets referenced by $<TARGET_OBJECTS:...> sources.
|
|
|
|
|
|
|
|
this->AddExternalObjectTargets();
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1052,6 +1063,26 @@ cmComputeLinkInformation::GetGroupFeature(std::string const& feature)
|
|
|
|
.first->second;
|
|
|
|
.first->second;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void cmComputeLinkInformation::AddExternalObjectTargets()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
std::vector<cmSourceFile const*> externalObjects;
|
|
|
|
|
|
|
|
this->Target->GetExternalObjects(externalObjects, this->Config);
|
|
|
|
|
|
|
|
std::set<std::string> emitted;
|
|
|
|
|
|
|
|
for (auto const* externalObject : externalObjects) {
|
|
|
|
|
|
|
|
std::string const& objLib = externalObject->GetObjectLibrary();
|
|
|
|
|
|
|
|
if (objLib.empty()) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (emitted.insert(objLib).second) {
|
|
|
|
|
|
|
|
cmLinkItem const& objItem =
|
|
|
|
|
|
|
|
this->Target->ResolveLinkItem(BT<std::string>(objLib));
|
|
|
|
|
|
|
|
if (objItem.Target) {
|
|
|
|
|
|
|
|
this->ExternalObjectTargets.emplace_back(objItem.Target);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void cmComputeLinkInformation::AddImplicitLinkInfo()
|
|
|
|
void cmComputeLinkInformation::AddImplicitLinkInfo()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// The link closure lists all languages whose implicit info is needed.
|
|
|
|
// The link closure lists all languages whose implicit info is needed.
|
|
|
@ -1220,7 +1251,7 @@ void cmComputeLinkInformation::AddItem(LinkEntry const& entry)
|
|
|
|
this->AddFullItem(entry);
|
|
|
|
this->AddFullItem(entry);
|
|
|
|
this->AddLibraryRuntimeInfo(item.Value);
|
|
|
|
this->AddLibraryRuntimeInfo(item.Value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else if (entry.Kind != cmComputeLinkDepends::LinkEntry::Object) {
|
|
|
|
// This is a library or option specified by the user.
|
|
|
|
// This is a library or option specified by the user.
|
|
|
|
this->AddUserItem(entry, true);
|
|
|
|
this->AddUserItem(entry, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|