diff options
Diffstat (limited to 'Source/cmExportTryCompileFileGenerator.cxx')
-rw-r--r-- | Source/cmExportTryCompileFileGenerator.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index 819ac37..a8a91d6 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -18,11 +18,11 @@ //---------------------------------------------------------------------------- bool cmExportTryCompileFileGenerator::GenerateMainFile(std::ostream& os) { - std::set<cmTarget*> emitted; - std::set<cmTarget*> emittedDeps; + std::set<cmTarget const*> emitted; + std::set<cmTarget const*> emittedDeps; while(!this->Exports.empty()) { - cmTarget* te = this->Exports.back(); + cmTarget const* te = this->Exports.back(); this->Exports.pop_back(); if (emitted.insert(te).second) { @@ -32,10 +32,12 @@ bool cmExportTryCompileFileGenerator::GenerateMainFile(std::ostream& os) ImportPropertyMap properties; #define FIND_TARGETS(PROPERTY) \ - this->FindTargets(#PROPERTY, te, emittedDeps); + this->FindTargets("INTERFACE_" #PROPERTY, te, emittedDeps); CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME(FIND_TARGETS) +#undef FIND_TARGETS + this->PopulateProperties(te, properties, emittedDeps); this->GenerateInterfaceProperties(te, os, properties); @@ -45,8 +47,8 @@ bool cmExportTryCompileFileGenerator::GenerateMainFile(std::ostream& os) } std::string cmExportTryCompileFileGenerator::FindTargets(const char *propName, - cmTarget *tgt, - std::set<cmTarget*> &emitted) + cmTarget const* tgt, + std::set<cmTarget const*> &emitted) { const char *prop = tgt->GetProperty(propName); if(!prop) @@ -70,8 +72,8 @@ std::string cmExportTryCompileFileGenerator::FindTargets(const char *propName, std::string result = cge->Evaluate(tgt->GetMakefile(), this->Config, false, &dummyHead, tgt, &dagChecker); - const std::set<cmTarget*> &allTargets = cge->GetAllTargetsSeen(); - for(std::set<cmTarget*>::const_iterator li = allTargets.begin(); + const std::set<cmTarget const*> &allTargets = cge->GetAllTargetsSeen(); + for(std::set<cmTarget const*>::const_iterator li = allTargets.begin(); li != allTargets.end(); ++li) { if(emitted.insert(*li).second) @@ -84,9 +86,9 @@ std::string cmExportTryCompileFileGenerator::FindTargets(const char *propName, //---------------------------------------------------------------------------- void -cmExportTryCompileFileGenerator::PopulateProperties(cmTarget* target, +cmExportTryCompileFileGenerator::PopulateProperties(cmTarget const* target, ImportPropertyMap& properties, - std::set<cmTarget*> &emitted) + std::set<cmTarget const*> &emitted) { cmPropertyMap props = target->GetProperties(); for(cmPropertyMap::const_iterator i = props.begin(); i != props.end(); ++i) @@ -107,7 +109,7 @@ cmExportTryCompileFileGenerator::PopulateProperties(cmTarget* target, for(std::vector<std::string>::const_iterator li = depends.begin(); li != depends.end(); ++li) { - cmTarget *tgt = target->GetMakefile()->FindTargetToUse(li->c_str()); + cmTarget *tgt = target->GetMakefile()->FindTargetToUse(*li); if(tgt && emitted.insert(tgt).second) { this->Exports.push_back(tgt); |