cmGeneratorTarget: Port LinkImplClosure to cmGeneratorTarget.

This commit is contained in:
Stephen Kelly 2015-10-08 01:45:44 +02:00
parent 763f7b19fc
commit f7acd74215
2 changed files with 18 additions and 18 deletions

View File

@ -883,12 +883,12 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
&dagChecker), result); &dagChecker), result);
} }
std::vector<cmTarget const*> const& deps = std::vector<cmGeneratorTarget const*> const& deps =
this->GetLinkImplementationClosure(config); this->GetLinkImplementationClosure(config);
for(std::vector<cmTarget const*>::const_iterator for(std::vector<cmGeneratorTarget const*>::const_iterator
li = deps.begin(), le = deps.end(); li != le; ++li) li = deps.begin(), le = deps.end(); li != le; ++li)
{ {
handleSystemIncludesDep(this->Makefile, *li, config, this, handleSystemIncludesDep(this->Makefile, (*li)->Target, config, this,
&dagChecker, result, excludeImported); &dagChecker, result, excludeImported);
} }
@ -2066,12 +2066,12 @@ void processILibs(const std::string& config,
cmGeneratorTarget const* headTarget, cmGeneratorTarget const* headTarget,
cmLinkItem const& item, cmLinkItem const& item,
cmGlobalGenerator* gg, cmGlobalGenerator* gg,
std::vector<cmTarget const*>& tgts, std::vector<cmGeneratorTarget const*>& tgts,
std::set<cmTarget const*>& emitted) std::set<cmTarget const*>& emitted)
{ {
if (item.Target && emitted.insert(item.Target->Target).second) if (item.Target && emitted.insert(item.Target->Target).second)
{ {
tgts.push_back(item.Target->Target); tgts.push_back(item.Target);
if(cmLinkInterfaceLibraries const* iface = if(cmLinkInterfaceLibraries const* iface =
item.Target->GetLinkInterfaceLibraries(config, headTarget, true)) item.Target->GetLinkInterfaceLibraries(config, headTarget, true))
{ {
@ -2086,7 +2086,7 @@ void processILibs(const std::string& config,
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
const std::vector<const cmTarget*>& const std::vector<const cmGeneratorTarget*>&
cmGeneratorTarget::GetLinkImplementationClosure( cmGeneratorTarget::GetLinkImplementationClosure(
const std::string& config) const const std::string& config) const
{ {
@ -3630,10 +3630,10 @@ cmGeneratorTarget::GetCompatibleInterfaces(std::string const& config) const
compat.Done = true; compat.Done = true;
compat.PropsBool.insert("POSITION_INDEPENDENT_CODE"); compat.PropsBool.insert("POSITION_INDEPENDENT_CODE");
compat.PropsString.insert("AUTOUIC_OPTIONS"); compat.PropsString.insert("AUTOUIC_OPTIONS");
std::vector<cmTarget const*> const& deps = std::vector<cmGeneratorTarget const*> const& deps =
this->GetLinkImplementationClosure(config); this->GetLinkImplementationClosure(config);
for(std::vector<cmTarget const*>::const_iterator li = deps.begin(); for(std::vector<cmGeneratorTarget const*>::const_iterator li =
li != deps.end(); ++li) deps.begin(); li != deps.end(); ++li)
{ {
#define CM_READ_COMPATIBLE_INTERFACE(X, x) \ #define CM_READ_COMPATIBLE_INTERFACE(X, x) \
if(const char* prop = (*li)->GetProperty("COMPATIBLE_INTERFACE_" #X)) \ if(const char* prop = (*li)->GetProperty("COMPATIBLE_INTERFACE_" #X)) \
@ -4129,7 +4129,7 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
assert((impliedByUse ^ explicitlySet) assert((impliedByUse ^ explicitlySet)
|| (!impliedByUse && !explicitlySet)); || (!impliedByUse && !explicitlySet));
std::vector<cmTarget const*> const& deps = std::vector<cmGeneratorTarget const*> const& deps =
tgt->GetLinkImplementationClosure(config); tgt->GetLinkImplementationClosure(config);
if(deps.empty()) if(deps.empty())
@ -4156,7 +4156,7 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
} }
std::string interfaceProperty = "INTERFACE_" + p; std::string interfaceProperty = "INTERFACE_" + p;
for(std::vector<cmTarget const*>::const_iterator li = for(std::vector<cmGeneratorTarget const*>::const_iterator li =
deps.begin(); deps.begin();
li != deps.end(); ++li) li != deps.end(); ++li)
{ {
@ -4166,13 +4166,13 @@ PropertyType checkInterfacePropertyCompatibility(cmGeneratorTarget const* tgt,
// target itself has a POSITION_INDEPENDENT_CODE which disagrees // target itself has a POSITION_INDEPENDENT_CODE which disagrees
// with a dependency. // with a dependency.
cmTarget const* theTarget = *li; cmGeneratorTarget const* theTarget = *li;
const bool ifaceIsSet = theTarget->GetProperties() const bool ifaceIsSet = theTarget->Target->GetProperties()
.find(interfaceProperty) .find(interfaceProperty)
!= theTarget->GetProperties().end(); != theTarget->Target->GetProperties().end();
PropertyType ifacePropContent = PropertyType ifacePropContent =
getTypedProperty<PropertyType>(theTarget, getTypedProperty<PropertyType>(theTarget->Target,
interfaceProperty); interfaceProperty);
std::string reportEntry; std::string reportEntry;

View File

@ -477,7 +477,7 @@ private:
cmGeneratorTarget(cmGeneratorTarget const&); cmGeneratorTarget(cmGeneratorTarget const&);
void operator=(cmGeneratorTarget const&); void operator=(cmGeneratorTarget const&);
struct LinkImplClosure: public std::vector<cmTarget const*> struct LinkImplClosure: public std::vector<cmGeneratorTarget const*>
{ {
LinkImplClosure(): Done(false) {} LinkImplClosure(): Done(false) {}
bool Done; bool Done;
@ -555,7 +555,7 @@ private:
std::string& out) const; std::string& out) const;
public: public:
std::vector<cmTarget const*> const& const std::vector<const cmGeneratorTarget*>&
GetLinkImplementationClosure(const std::string& config) const; GetLinkImplementationClosure(const std::string& config) const;
mutable std::map<std::string, std::string> MaxLanguageStandards; mutable std::map<std::string, std::string> MaxLanguageStandards;