This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via da69b3979d6e90bff5ce72b49f9c3b8e8496b648 (commit) via 4730a457d0b9d2f14a07744aea5144e76cb7c266 (commit) via 058624ce98b34dc2bd63c62f89000bf6fdef03c3 (commit) via 23ac9e58959cb125a91b45e80d131ab448d66eec (commit) via d88f83077b3b2c200d58d21bdad65308729ebfd8 (commit) via 83122c32ab533dbb32ce4ce6de70b069a217b437 (commit) via 398cdc2be369239bcd9bac5f98fe937a1253f664 (commit) via 1fe2c9a166727d14b5cc56bfe0425f9be12e578e (commit) via 906c9a26630e4fcf2360dd9e824b0191ecaf887f (commit) via ae94ca1c5902dc12ddd7eb7a9e4b197ddde5c884 (commit) via 239c6d37e28e3a979122999e8555696865fb4824 (commit) via 10040601a2e13cbb0653a20c55c1c696b5cacf29 (commit) via d9da6ee29fe0267ed347860f24f21be647ac81e8 (commit) via 27252b2414f5034b16a447273e1f249fdf317b72 (commit) from 6b479d5ee112efce1565fb8cbdebe389af3a9337 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da69b3979d6e90bff5ce72b49f9c3b8e8496b648 commit da69b3979d6e90bff5ce72b49f9c3b8e8496b648 Merge: 6b479d5 4730a45 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Thu Aug 6 19:03:19 2015 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Aug 6 19:03:19 2015 -0400 Merge topic 'use-generator-target' into next 4730a457 cmTarget: Use a simpler delete algorithm. 058624ce cmTarget: Split storage of sources from genexes. 23ac9e58 cmTarget: Split storage of compile definitions from genexes. d88f8307 cmTarget: Split storage of compile features from genexes. 83122c32 cmTarget: Split storage of compile options from genexes. 398cdc2b cmTarget: Split storage of include directories from genexes. 1fe2c9a1 cmTarget: Request only the link libraries where needed. 906c9a26 cmGeneratorTarget: Move link iface helpers from cmTarget. ae94ca1c cmGeneratorTarget: Move GetLinkInterface from cmTarget. 239c6d37 cmGlobalGenerator: Return null generator target for target. 10040601 cmLinkImplementationLibraries: Move to namespace scope. d9da6ee2 cmLinkItem: Split to separate file. 27252b24 cmComputeLinkInformation: Simplify generator object access. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4730a457d0b9d2f14a07744aea5144e76cb7c266 commit 4730a457d0b9d2f14a07744aea5144e76cb7c266 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 23:16:12 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 01:03:00 2015 +0200 cmTarget: Use a simpler delete algorithm. This way, the methods can be moved without requiring a local algorithm. The containers use automatic storage. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 54934c1..ef2df21 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -161,14 +161,6 @@ public: cmLinkImplItem cmTargetInternals::TargetPropertyEntry::NoLinkImplItem; //---------------------------------------------------------------------------- -static void deleteAndClear( - std::vector<cmTargetInternals::TargetPropertyEntry*> &entries) -{ - cmDeleteAll(entries); - entries.clear(); -} - -//---------------------------------------------------------------------------- cmTargetInternals::~cmTargetInternals() { } @@ -783,7 +775,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files, this->LinkImplementationLanguageIsContextDependent = false; } - deleteAndClear(linkInterfaceSourcesEntries); + cmDeleteAll(linkInterfaceSourcesEntries); } //---------------------------------------------------------------------------- @@ -2138,7 +2130,7 @@ cmTarget::GetIncludeDirectories(const std::string& config, debugIncludes, language); - deleteAndClear(linkInterfaceIncludeDirectoriesEntries); + cmDeleteAll(linkInterfaceIncludeDirectoriesEntries); return includes; } @@ -2259,7 +2251,7 @@ void cmTarget::GetCompileOptions(std::vector<std::string> &result, debugOptions, language); - deleteAndClear(linkInterfaceCompileOptionsEntries); + cmDeleteAll(linkInterfaceCompileOptionsEntries); } //---------------------------------------------------------------------------- @@ -2361,7 +2353,7 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list, debugDefines, language); - deleteAndClear(linkInterfaceCompileDefinitionsEntries); + cmDeleteAll(linkInterfaceCompileDefinitionsEntries); } //---------------------------------------------------------------------------- @@ -2428,7 +2420,7 @@ void cmTarget::GetCompileFeatures(std::vector<std::string> &result, config, debugFeatures); - deleteAndClear(linkInterfaceCompileFeaturesEntries); + cmDeleteAll(linkInterfaceCompileFeaturesEntries); } //---------------------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=058624ce98b34dc2bd63c62f89000bf6fdef03c3 commit 058624ce98b34dc2bd63c62f89000bf6fdef03c3 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 21:46:15 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 01:03:00 2015 +0200 cmTarget: Split storage of sources from genexes. diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index ce806ba..b094125 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -313,7 +313,9 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg, makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES", mocCppFile.c_str(), false); - target->AddSource(mocCppFile); + std::vector<std::string> mocCppFiles; + mocCppFiles.push_back(mocCppFile); + target->AddTracedSources(mocCppFiles); } // create a custom target for running generators at buildtime: std::string autogenTargetName = getAutogenTargetName(target); @@ -737,12 +739,7 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target) } } - for(std::vector<std::string>::const_iterator fileIt = newRccFiles.begin(); - fileIt != newRccFiles.end(); - ++fileIt) - { - const_cast<cmTarget*>(target)->AddSource(*fileIt); - } + const_cast<cmTarget*>(target)->AddTracedSources(newRccFiles); } void cmQtAutoGenerators::SetupAutoMocTarget(cmTarget const* target, diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c14691c..54934c1 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -148,7 +148,9 @@ public: std::vector<std::string> CompileDefinitionsEntries; std::vector<cmListFileBacktrace> CompileDefinitionsBacktraces; std::vector<TargetPropertyEntry*> CompileDefinitionsItems; - std::vector<TargetPropertyEntry*> SourceEntries; + std::vector<std::string> SourceEntries; + std::vector<cmListFileBacktrace> SourceBacktraces; + std::vector<TargetPropertyEntry*> SourceItems; std::vector<cmValueWithOrigin> LinkImplementationPropertyEntries; void AddInterfaceEntries( @@ -416,7 +418,8 @@ void cmTarget::SetMakefile(cmMakefile* mf) void CreatePropertyGeneratorExpressions( std::vector<std::string> const& entries, std::vector<cmListFileBacktrace> const& backtraces, - std::vector<cmTargetInternals::TargetPropertyEntry*>& items) + std::vector<cmTargetInternals::TargetPropertyEntry*>& items, + bool evaluateForBuildsystem = false) { std::vector<cmListFileBacktrace>::const_iterator btIt = backtraces.begin(); for (std::vector<std::string>::const_iterator it = entries.begin(); @@ -424,6 +427,7 @@ void CreatePropertyGeneratorExpressions( { cmGeneratorExpression ge(*btIt); cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*it); + cge->SetEvaluateForBuildsystem(evaluateForBuildsystem); items.push_back(new cmTargetInternals::TargetPropertyEntry(cge)); } } @@ -449,6 +453,11 @@ void cmTarget::Compute() this->Internal->CompileDefinitionsEntries, this->Internal->CompileDefinitionsBacktraces, this->Internal->CompileDefinitionsItems); + + CreatePropertyGeneratorExpressions( + this->Internal->SourceEntries, + this->Internal->SourceBacktraces, + this->Internal->SourceItems, true); } //---------------------------------------------------------------------------- @@ -699,13 +708,11 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files, // for TARGET_OBJECTS instead for backwards compatibility with OLD // behavior of CMP0024 and CMP0026 only. - typedef cmTargetInternals::TargetPropertyEntry - TargetPropertyEntry; - for(std::vector<TargetPropertyEntry*>::const_iterator + for(std::vector<std::string>::const_iterator i = this->Internal->SourceEntries.begin(); i != this->Internal->SourceEntries.end(); ++i) { - std::string entry = (*i)->ge->GetInput(); + std::string const& entry = *i; std::vector<std::string> items; cmSystemTools::ExpandListArgument(entry, items); @@ -747,7 +754,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files, UNORDERED_SET<std::string> uniqueSrcs; bool contextDependentDirectSources = processSources(this, - this->Internal->SourceEntries, + this->Internal->SourceItems, files, uniqueSrcs, &dagChecker, @@ -884,11 +891,12 @@ void cmTarget::AddTracedSources(std::vector<std::string> const& srcs) this->Internal->SourceFilesMap.clear(); this->LinkImplementationLanguageIsContextDependent = true; cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); + this->Internal->SourceEntries.push_back(srcFiles); + this->Internal->SourceBacktraces.push_back(lfbt); cmGeneratorExpression ge(lfbt); cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(srcFiles); - cge->SetEvaluateForBuildsystem(true); - this->Internal->SourceEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(cge)); + this->Internal->SourceItems.push_back( + new cmTargetInternals::TargetPropertyEntry(cge)); } } @@ -924,11 +932,8 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs) this->Internal->SourceFilesMap.clear(); this->LinkImplementationLanguageIsContextDependent = true; cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(srcFiles); - cge->SetEvaluateForBuildsystem(true); - this->Internal->SourceEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(cge)); + this->Internal->SourceEntries.push_back(srcFiles); + this->Internal->SourceBacktraces.push_back(lfbt); } } @@ -1032,10 +1037,10 @@ public: } - bool operator()(cmTargetInternals::TargetPropertyEntry* entry) + bool operator()(std::string const& entry) { std::vector<std::string> files; - cmSystemTools::ExpandListArgument(entry->ge->GetInput(), files); + cmSystemTools::ExpandListArgument(entry, files); std::vector<cmSourceFileLocation> locations(files.size()); std::transform(files.begin(), files.end(), locations.begin(), CreateLocation(this->Needle.GetMakefile())); @@ -1057,11 +1062,8 @@ cmSourceFile* cmTarget::AddSource(const std::string& src) this->Internal->SourceFilesMap.clear(); this->LinkImplementationLanguageIsContextDependent = true; cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(src); - cge->SetEvaluateForBuildsystem(true); - this->Internal->SourceEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(cge)); + this->Internal->SourceEntries.push_back(src); + this->Internal->SourceBacktraces.push_back(lfbt); } if (cmGeneratorExpression::Find(src) != std::string::npos) { @@ -1736,11 +1738,11 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) } this->Internal->SourceFilesMap.clear(); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); + this->Internal->SourceEntries.clear(); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value); - this->Internal->SourceEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(cge)); + this->Internal->SourceBacktraces.clear(); + this->Internal->SourceEntries.push_back(value); + this->Internal->SourceBacktraces.push_back(lfbt); } else { @@ -1821,10 +1823,8 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } this->Internal->SourceFilesMap.clear(); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value); - this->Internal->SourceEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(cge)); + this->Internal->SourceEntries.push_back(value); + this->Internal->SourceBacktraces.push_back(lfbt); } else { @@ -2949,13 +2949,11 @@ const char *cmTarget::GetProperty(const std::string& prop, std::ostringstream ss; const char* sep = ""; - typedef cmTargetInternals::TargetPropertyEntry - TargetPropertyEntry; - for(std::vector<TargetPropertyEntry*>::const_iterator + for(std::vector<std::string>::const_iterator i = this->Internal->SourceEntries.begin(); i != this->Internal->SourceEntries.end(); ++i) { - std::string entry = (*i)->ge->GetInput(); + std::string const& entry = *i; std::vector<std::string> files; cmSystemTools::ExpandListArgument(entry, files); @@ -3610,13 +3608,11 @@ cmTarget::GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const // there is no cmGeneratorTarget at configure-time, so search the SOURCES // for TARGET_OBJECTS instead for backwards compatibility with OLD // behavior of CMP0024 and CMP0026 only. - typedef cmTargetInternals::TargetPropertyEntry - TargetPropertyEntry; - for(std::vector<TargetPropertyEntry*>::const_iterator + for(std::vector<std::string>::const_iterator i = this->Internal->SourceEntries.begin(); i != this->Internal->SourceEntries.end(); ++i) { - std::string entry = (*i)->ge->GetInput(); + std::string const& entry = *i; std::vector<std::string> files; cmSystemTools::ExpandListArgument(entry, files); @@ -4366,7 +4362,7 @@ cmTargetInternalPointer::~cmTargetInternalPointer() cmDeleteAll(this->Pointer->CompileOptionsItems); cmDeleteAll(this->Pointer->CompileFeaturesItems); cmDeleteAll(this->Pointer->CompileDefinitionsItems); - cmDeleteAll(this->Pointer->SourceEntries); + cmDeleteAll(this->Pointer->SourceItems); delete this->Pointer; } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23ac9e58959cb125a91b45e80d131ab448d66eec commit 23ac9e58959cb125a91b45e80d131ab448d66eec Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 21:30:17 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 01:02:57 2015 +0200 cmTarget: Split storage of compile definitions from genexes. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1762d2f..c14691c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -145,7 +145,9 @@ public: std::vector<std::string> CompileFeaturesEntries; std::vector<cmListFileBacktrace> CompileFeaturesBacktraces; std::vector<TargetPropertyEntry*> CompileFeaturesItems; - std::vector<TargetPropertyEntry*> CompileDefinitionsEntries; + std::vector<std::string> CompileDefinitionsEntries; + std::vector<cmListFileBacktrace> CompileDefinitionsBacktraces; + std::vector<TargetPropertyEntry*> CompileDefinitionsItems; std::vector<TargetPropertyEntry*> SourceEntries; std::vector<cmValueWithOrigin> LinkImplementationPropertyEntries; @@ -442,6 +444,11 @@ void cmTarget::Compute() this->Internal->CompileFeaturesEntries, this->Internal->CompileFeaturesBacktraces, this->Internal->CompileFeaturesItems); + + CreatePropertyGeneratorExpressions( + this->Internal->CompileDefinitionsEntries, + this->Internal->CompileDefinitionsBacktraces, + this->Internal->CompileDefinitionsItems); } //---------------------------------------------------------------------------- @@ -1694,12 +1701,11 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) } else if(prop == "COMPILE_DEFINITIONS") { + this->Internal->CompileDefinitionsEntries.clear(); + this->Internal->CompileDefinitionsBacktraces.clear(); + this->Internal->CompileDefinitionsEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - deleteAndClear(this->Internal->CompileDefinitionsEntries); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value); - this->Internal->CompileDefinitionsEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(cge)); + this->Internal->CompileDefinitionsBacktraces.push_back(lfbt); } else if(prop == "EXPORT_NAME" && this->IsImported()) { @@ -1783,10 +1789,9 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } else if(prop == "COMPILE_DEFINITIONS") { + this->Internal->CompileDefinitionsEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - this->Internal->CompileDefinitionsEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(ge.Parse(value))); + this->Internal->CompileDefinitionsBacktraces.push_back(lfbt); } else if(prop == "EXPORT_NAME" && this->IsImported()) { @@ -1918,10 +1923,8 @@ void cmTarget::InsertCompileOption(std::string const& entry, void cmTarget::InsertCompileDefinition(std::string const& entry, cmListFileBacktrace const& bt) { - cmGeneratorExpression ge(bt); - - this->Internal->CompileDefinitionsEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(ge.Parse(entry))); + this->Internal->CompileDefinitionsEntries.push_back(entry); + this->Internal->CompileDefinitionsBacktraces.push_back(bt); } //---------------------------------------------------------------------------- @@ -2303,7 +2306,7 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list, } processCompileDefinitions(this, - this->Internal->CompileDefinitionsEntries, + this->Internal->CompileDefinitionsItems, list, uniqueOptions, &dagChecker, @@ -2711,22 +2714,6 @@ bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const } //---------------------------------------------------------------------------- -static void MakePropertyList(std::string& output, - std::vector<cmTargetInternals::TargetPropertyEntry*> const& values) -{ - output = ""; - std::string sep; - for (std::vector<cmTargetInternals::TargetPropertyEntry*>::const_iterator - it = values.begin(), end = values.end(); - it != end; ++it) - { - output += sep; - output += (*it)->ge->GetInput(); - sep = ";"; - } -} - -//---------------------------------------------------------------------------- const char *cmTarget::GetProperty(const std::string& prop) const { return this->GetProperty(prop, this->Makefile); @@ -2934,7 +2921,7 @@ const char *cmTarget::GetProperty(const std::string& prop, } static std::string output; - MakePropertyList(output, this->Internal->CompileDefinitionsEntries); + output = cmJoin(this->Internal->CompileDefinitionsEntries, ";"); return output.c_str(); } else if (prop == propIMPORTED) @@ -4378,7 +4365,7 @@ cmTargetInternalPointer::~cmTargetInternalPointer() cmDeleteAll(this->Pointer->IncludeDirectoriesItems); cmDeleteAll(this->Pointer->CompileOptionsItems); cmDeleteAll(this->Pointer->CompileFeaturesItems); - cmDeleteAll(this->Pointer->CompileDefinitionsEntries); + cmDeleteAll(this->Pointer->CompileDefinitionsItems); cmDeleteAll(this->Pointer->SourceEntries); delete this->Pointer; } http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d88f83077b3b2c200d58d21bdad65308729ebfd8 commit d88f83077b3b2c200d58d21bdad65308729ebfd8 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 21:23:38 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 00:59:46 2015 +0200 cmTarget: Split storage of compile features from genexes. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ae8fea2..1762d2f 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -142,7 +142,9 @@ public: std::vector<std::string> CompileOptionsEntries; std::vector<cmListFileBacktrace> CompileOptionsBacktraces; std::vector<TargetPropertyEntry*> CompileOptionsItems; - std::vector<TargetPropertyEntry*> CompileFeaturesEntries; + std::vector<std::string> CompileFeaturesEntries; + std::vector<cmListFileBacktrace> CompileFeaturesBacktraces; + std::vector<TargetPropertyEntry*> CompileFeaturesItems; std::vector<TargetPropertyEntry*> CompileDefinitionsEntries; std::vector<TargetPropertyEntry*> SourceEntries; std::vector<cmValueWithOrigin> LinkImplementationPropertyEntries; @@ -435,6 +437,11 @@ void cmTarget::Compute() this->Internal->CompileOptionsEntries, this->Internal->CompileOptionsBacktraces, this->Internal->CompileOptionsItems); + + CreatePropertyGeneratorExpressions( + this->Internal->CompileFeaturesEntries, + this->Internal->CompileFeaturesBacktraces, + this->Internal->CompileFeaturesItems); } //---------------------------------------------------------------------------- @@ -1679,12 +1686,11 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) } else if(prop == "COMPILE_FEATURES") { + this->Internal->CompileFeaturesEntries.clear(); + this->Internal->CompileFeaturesBacktraces.clear(); + this->Internal->CompileFeaturesEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - deleteAndClear(this->Internal->CompileFeaturesEntries); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value); - this->Internal->CompileFeaturesEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(cge)); + this->Internal->CompileFeaturesBacktraces.push_back(lfbt); } else if(prop == "COMPILE_DEFINITIONS") { @@ -1771,10 +1777,9 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } else if(prop == "COMPILE_FEATURES") { + this->Internal->CompileFeaturesEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - this->Internal->CompileFeaturesEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(ge.Parse(value))); + this->Internal->CompileFeaturesBacktraces.push_back(lfbt); } else if(prop == "COMPILE_DEFINITIONS") { @@ -2399,7 +2404,7 @@ void cmTarget::GetCompileFeatures(std::vector<std::string> &result, } processCompileFeatures(this, - this->Internal->CompileFeaturesEntries, + this->Internal->CompileFeaturesItems, result, uniqueFeatures, &dagChecker, @@ -2907,7 +2912,7 @@ const char *cmTarget::GetProperty(const std::string& prop, } static std::string output; - MakePropertyList(output, this->Internal->CompileFeaturesEntries); + output = cmJoin(this->Internal->CompileFeaturesEntries, ";"); return output.c_str(); } else if(prop == propCOMPILE_OPTIONS) @@ -4372,7 +4377,7 @@ cmTargetInternalPointer::~cmTargetInternalPointer() { cmDeleteAll(this->Pointer->IncludeDirectoriesItems); cmDeleteAll(this->Pointer->CompileOptionsItems); - cmDeleteAll(this->Pointer->CompileFeaturesEntries); + cmDeleteAll(this->Pointer->CompileFeaturesItems); cmDeleteAll(this->Pointer->CompileDefinitionsEntries); cmDeleteAll(this->Pointer->SourceEntries); delete this->Pointer; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=83122c32ab533dbb32ce4ce6de70b069a217b437 commit 83122c32ab533dbb32ce4ce6de70b069a217b437 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 21:19:00 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 00:59:45 2015 +0200 cmTarget: Split storage of compile options from genexes. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 23553c0..ae8fea2 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -139,7 +139,9 @@ public: std::vector<std::string> IncludeDirectoriesEntries; std::vector<cmListFileBacktrace> IncludeDirectoriesBacktraces; std::vector<TargetPropertyEntry*> IncludeDirectoriesItems; - std::vector<TargetPropertyEntry*> CompileOptionsEntries; + std::vector<std::string> CompileOptionsEntries; + std::vector<cmListFileBacktrace> CompileOptionsBacktraces; + std::vector<TargetPropertyEntry*> CompileOptionsItems; std::vector<TargetPropertyEntry*> CompileFeaturesEntries; std::vector<TargetPropertyEntry*> CompileDefinitionsEntries; std::vector<TargetPropertyEntry*> SourceEntries; @@ -354,13 +356,12 @@ void cmTarget::SetMakefile(cmMakefile* mf) const cmBacktraceRange parentOptionsBts = this->Makefile->GetCompileOptionsBacktraces(); - cmBacktraceRange::const_iterator btIt = parentOptionsBts.begin(); - for (cmStringRange::const_iterator it - = parentOptions.begin(); - it != parentOptions.end(); ++it, ++btIt) - { - this->InsertCompileOption(*it, *btIt); - } + this->Internal->CompileOptionsEntries.insert( + this->Internal->CompileOptionsEntries.end(), + parentOptions.begin(), parentOptions.end()); + this->Internal->CompileOptionsBacktraces.insert( + this->Internal->CompileOptionsBacktraces.end(), + parentOptionsBts.begin(), parentOptionsBts.end()); } if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY) @@ -429,6 +430,11 @@ void cmTarget::Compute() this->Internal->IncludeDirectoriesEntries, this->Internal->IncludeDirectoriesBacktraces, this->Internal->IncludeDirectoriesItems); + + CreatePropertyGeneratorExpressions( + this->Internal->CompileOptionsEntries, + this->Internal->CompileOptionsBacktraces, + this->Internal->CompileOptionsItems); } //---------------------------------------------------------------------------- @@ -1665,12 +1671,11 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) } else if(prop == "COMPILE_OPTIONS") { + this->Internal->CompileOptionsEntries.clear(); + this->Internal->CompileOptionsBacktraces.clear(); + this->Internal->CompileOptionsEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - deleteAndClear(this->Internal->CompileOptionsEntries); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value); - this->Internal->CompileOptionsEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(cge)); + this->Internal->CompileOptionsBacktraces.push_back(lfbt); } else if(prop == "COMPILE_FEATURES") { @@ -1760,10 +1765,9 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } else if(prop == "COMPILE_OPTIONS") { + this->Internal->CompileOptionsEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - this->Internal->CompileOptionsEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(ge.Parse(value))); + this->Internal->CompileOptionsBacktraces.push_back(lfbt); } else if(prop == "COMPILE_FEATURES") { @@ -1893,14 +1897,16 @@ void cmTarget::InsertCompileOption(std::string const& entry, cmListFileBacktrace const& bt, bool before) { - cmGeneratorExpression ge(bt); + std::vector<std::string>::iterator position = + before ? this->Internal->CompileOptionsEntries.begin() + : this->Internal->CompileOptionsEntries.end(); - std::vector<cmTargetInternals::TargetPropertyEntry*>::iterator position - = before ? this->Internal->CompileOptionsEntries.begin() - : this->Internal->CompileOptionsEntries.end(); + std::vector<cmListFileBacktrace>::iterator btPosition = + before ? this->Internal->CompileOptionsBacktraces.begin() + : this->Internal->CompileOptionsBacktraces.end(); - this->Internal->CompileOptionsEntries.insert(position, - new cmTargetInternals::TargetPropertyEntry(ge.Parse(entry))); + this->Internal->CompileOptionsEntries.insert(position, entry); + this->Internal->CompileOptionsBacktraces.insert(btPosition, bt); } //---------------------------------------------------------------------------- @@ -2221,7 +2227,7 @@ void cmTarget::GetCompileOptions(std::vector<std::string> &result, } processCompileOptions(this, - this->Internal->CompileOptionsEntries, + this->Internal->CompileOptionsItems, result, uniqueOptions, &dagChecker, @@ -2912,7 +2918,7 @@ const char *cmTarget::GetProperty(const std::string& prop, } static std::string output; - MakePropertyList(output, this->Internal->CompileOptionsEntries); + output = cmJoin(this->Internal->CompileOptionsEntries, ";"); return output.c_str(); } else if(prop == propCOMPILE_DEFINITIONS) @@ -4365,7 +4371,7 @@ cmTargetInternalPointer cmTargetInternalPointer::~cmTargetInternalPointer() { cmDeleteAll(this->Pointer->IncludeDirectoriesItems); - cmDeleteAll(this->Pointer->CompileOptionsEntries); + cmDeleteAll(this->Pointer->CompileOptionsItems); cmDeleteAll(this->Pointer->CompileFeaturesEntries); cmDeleteAll(this->Pointer->CompileDefinitionsEntries); cmDeleteAll(this->Pointer->SourceEntries); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=398cdc2be369239bcd9bac5f98fe937a1253f664 commit 398cdc2be369239bcd9bac5f98fe937a1253f664 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 20:25:02 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 00:59:44 2015 +0200 cmTarget: Split storage of include directories from genexes. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 09c796b..195fa0d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1549,6 +1549,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes, ti != targets.end(); ++ti) { cmTarget* t = &ti->second; + t->Compute(); cmGeneratorTarget* gt = new cmGeneratorTarget(t, lg); this->GeneratorTargets[t] = gt; generatorTargets[t] = gt; diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index d5a5585..51dcab0 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -254,6 +254,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget() mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, false, no_working_directory, no_depends, noCommandLines); + tgt->Compute(); cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg); mf->AddGeneratorTarget(tgt, gt); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 2f9d79a..b69fc65 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -90,6 +90,7 @@ bool cmGlobalVisualStudioGenerator::Compute() AddUtilityCommand("ALL_BUILD", true, no_working_dir, no_depends, no_commands, false, "Build all projects"); + allBuild->Compute(); cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, gen[0]); allBuild->GetMakefile()->AddGeneratorTarget(allBuild, gt); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 5006828..aae0b23 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -463,6 +463,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, cmTarget* allbuild = mf->AddUtilityCommand("ALL_BUILD", true, no_depends, no_working_directory, "echo", "Build all projects"); + allBuild->Compute(); cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root); mf->AddGeneratorTarget(allbuild, allBuildGt); @@ -497,6 +498,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, true, no_depends, no_working_directory, "make", "-f", file.c_str()); + check->Compute(); cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root); mf->AddGeneratorTarget(check, checkGt); } diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index f1ba2f4..ce806ba 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -475,6 +475,8 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg, /*byproducts=*/rcc_output, depends, commandLines, false, autogenComment.c_str()); + autogenTarget->Compute(); + cmGeneratorTarget* gt = new cmGeneratorTarget(autogenTarget, lg); makefile->AddGeneratorTarget(autogenTarget, gt); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 8830bf2..23553c0 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -136,7 +136,9 @@ public: const cmsys::auto_ptr<cmCompiledGeneratorExpression> ge; cmLinkImplItem const& LinkImplItem; }; - std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries; + std::vector<std::string> IncludeDirectoriesEntries; + std::vector<cmListFileBacktrace> IncludeDirectoriesBacktraces; + std::vector<TargetPropertyEntry*> IncludeDirectoriesItems; std::vector<TargetPropertyEntry*> CompileOptionsEntries; std::vector<TargetPropertyEntry*> CompileFeaturesEntries; std::vector<TargetPropertyEntry*> CompileDefinitionsEntries; @@ -334,13 +336,13 @@ void cmTarget::SetMakefile(cmMakefile* mf) const cmBacktraceRange parentIncludesBts = this->Makefile->GetIncludeDirectoriesBacktraces(); - cmBacktraceRange::const_iterator btIt = parentIncludesBts.begin(); - for (cmStringRange::const_iterator it - = parentIncludes.begin(); - it != parentIncludes.end(); ++it, ++btIt) - { - this->InsertInclude(*it, *btIt); - } + this->Internal->IncludeDirectoriesEntries.insert( + this->Internal->IncludeDirectoriesEntries.end(), + parentIncludes.begin(), parentIncludes.end()); + this->Internal->IncludeDirectoriesBacktraces.insert( + this->Internal->IncludeDirectoriesBacktraces.end(), + parentIncludesBts.begin(), parentIncludesBts.end()); + const std::set<std::string> parentSystemIncludes = this->Makefile->GetSystemIncludeDirectories(); @@ -352,7 +354,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) const cmBacktraceRange parentOptionsBts = this->Makefile->GetCompileOptionsBacktraces(); - btIt = parentOptionsBts.begin(); + cmBacktraceRange::const_iterator btIt = parentOptionsBts.begin(); for (cmStringRange::const_iterator it = parentOptions.begin(); it != parentOptions.end(); ++it, ++btIt) @@ -406,6 +408,29 @@ void cmTarget::SetMakefile(cmMakefile* mf) } } +void CreatePropertyGeneratorExpressions( + std::vector<std::string> const& entries, + std::vector<cmListFileBacktrace> const& backtraces, + std::vector<cmTargetInternals::TargetPropertyEntry*>& items) +{ + std::vector<cmListFileBacktrace>::const_iterator btIt = backtraces.begin(); + for (std::vector<std::string>::const_iterator it = entries.begin(); + it != entries.end(); ++it, ++btIt) + { + cmGeneratorExpression ge(*btIt); + cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*it); + items.push_back(new cmTargetInternals::TargetPropertyEntry(cge)); + } +} + +void cmTarget::Compute() +{ + CreatePropertyGeneratorExpressions( + this->Internal->IncludeDirectoriesEntries, + this->Internal->IncludeDirectoriesBacktraces, + this->Internal->IncludeDirectoriesItems); +} + //---------------------------------------------------------------------------- void cmTarget::AddUtility(const std::string& u, cmMakefile *makefile) { @@ -1632,12 +1657,11 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) } else if(prop == "INCLUDE_DIRECTORIES") { + this->Internal->IncludeDirectoriesEntries.clear(); + this->Internal->IncludeDirectoriesBacktraces.clear(); + this->Internal->IncludeDirectoriesEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - deleteAndClear(this->Internal->IncludeDirectoriesEntries); - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value); - this->Internal->IncludeDirectoriesEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(cge)); + this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt); } else if(prop == "COMPILE_OPTIONS") { @@ -1730,10 +1754,9 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value, } else if(prop == "INCLUDE_DIRECTORIES") { + this->Internal->IncludeDirectoriesEntries.push_back(value); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); - cmGeneratorExpression ge(lfbt); - this->Internal->IncludeDirectoriesEntries.push_back( - new cmTargetInternals::TargetPropertyEntry(ge.Parse(value))); + this->Internal->IncludeDirectoriesBacktraces.push_back(lfbt); } else if(prop == "COMPILE_OPTIONS") { @@ -1853,14 +1876,16 @@ void cmTarget::InsertInclude(std::string const& entry, cmListFileBacktrace const& bt, bool before) { - cmGeneratorExpression ge(bt); + std::vector<std::string>::iterator position = + before ? this->Internal->IncludeDirectoriesEntries.begin() + : this->Internal->IncludeDirectoriesEntries.end(); - std::vector<cmTargetInternals::TargetPropertyEntry*>::iterator position - = before ? this->Internal->IncludeDirectoriesEntries.begin() - : this->Internal->IncludeDirectoriesEntries.end(); + std::vector<cmListFileBacktrace>::iterator btPosition = + before ? this->Internal->IncludeDirectoriesBacktraces.begin() + : this->Internal->IncludeDirectoriesBacktraces.end(); - this->Internal->IncludeDirectoriesEntries.insert(position, - new cmTargetInternals::TargetPropertyEntry(ge.Parse(entry))); + this->Internal->IncludeDirectoriesEntries.insert(position, entry); + this->Internal->IncludeDirectoriesBacktraces.insert(btPosition, bt); } //---------------------------------------------------------------------------- @@ -2049,7 +2074,7 @@ cmTarget::GetIncludeDirectories(const std::string& config, } processIncludeDirectories(this, - this->Internal->IncludeDirectoriesEntries, + this->Internal->IncludeDirectoriesItems, includes, uniqueIncludes, &dagChecker, @@ -2865,7 +2890,7 @@ const char *cmTarget::GetProperty(const std::string& prop, } static std::string output; - MakePropertyList(output, this->Internal->IncludeDirectoriesEntries); + output = cmJoin(this->Internal->IncludeDirectoriesEntries, ";"); return output.c_str(); } else if(prop == propCOMPILE_FEATURES) @@ -4339,7 +4364,7 @@ cmTargetInternalPointer //---------------------------------------------------------------------------- cmTargetInternalPointer::~cmTargetInternalPointer() { - cmDeleteAll(this->Pointer->IncludeDirectoriesEntries); + cmDeleteAll(this->Pointer->IncludeDirectoriesItems); cmDeleteAll(this->Pointer->CompileOptionsEntries); cmDeleteAll(this->Pointer->CompileFeaturesEntries); cmDeleteAll(this->Pointer->CompileDefinitionsEntries); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 3e689ae..dcf6832 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -132,6 +132,8 @@ public: void AddPostBuildCommand(cmCustomCommand const &cmd) {this->PostBuildCommands.push_back(cmd);} + void Compute(); + /** * Get the list of the source files used by this target */ http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1fe2c9a166727d14b5cc56bfe0425f9be12e578e commit 1fe2c9a166727d14b5cc56bfe0425f9be12e578e Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 19:22:30 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 00:59:44 2015 +0200 cmTarget: Request only the link libraries where needed. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ba72fdc..8830bf2 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2065,7 +2065,8 @@ cmTarget::GetIncludeDirectories(const std::string& config, if(this->Makefile->IsOn("APPLE")) { - LinkImplementation const* impl = this->GetLinkImplementation(config); + cmLinkImplementationLibraries const* impl = + this->GetLinkImplementationLibraries(config); for(std::vector<cmLinkImplItem>::const_iterator it = impl->Libraries.begin(); it != impl->Libraries.end(); ++it) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=906c9a26630e4fcf2360dd9e824b0191ecaf887f commit 906c9a26630e4fcf2360dd9e824b0191ecaf887f Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 19:22:30 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 00:59:43 2015 +0200 cmGeneratorTarget: Move link iface helpers from cmTarget. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 27d6a99..fa1622e 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3334,6 +3334,51 @@ cmGeneratorTarget::ReportPropertyOrigin(const std::string &p, } //---------------------------------------------------------------------------- +void cmGeneratorTarget::LookupLinkItems(std::vector<std::string> const& names, + std::vector<cmLinkItem>& items) const +{ + for(std::vector<std::string>::const_iterator i = names.begin(); + i != names.end(); ++i) + { + std::string name = this->Target->CheckCMP0004(*i); + if(name == this->GetName() || name.empty()) + { + continue; + } + items.push_back(cmLinkItem(name, this->Target->FindTargetToLink(name))); + } +} + +//---------------------------------------------------------------------------- +void cmGeneratorTarget::ExpandLinkItems(std::string const& prop, + std::string const& value, + std::string const& config, + cmTarget const* headTarget, + bool usage_requirements_only, + std::vector<cmLinkItem>& items, + bool& hadHeadSensitiveCondition) const +{ + cmGeneratorExpression ge; + cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), prop, 0, 0); + // The $<LINK_ONLY> expression may be in a link interface to specify private + // link dependencies that are otherwise excluded from usage requirements. + if(usage_requirements_only) + { + dagChecker.SetTransitivePropertiesOnly(); + } + std::vector<std::string> libs; + cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value); + cmSystemTools::ExpandListArgument(cge->Evaluate( + this->Makefile, + config, + false, + headTarget, + this->Target, &dagChecker), libs); + this->LookupLinkItems(libs, items); + hadHeadSensitiveCondition = cge->GetHadHeadSensitiveCondition(); +} + +//---------------------------------------------------------------------------- cmGeneratorTarget::LinkInterface const* cmGeneratorTarget::GetLinkInterface( const std::string& config, cmTarget const* head) const @@ -3368,14 +3413,14 @@ cmGeneratorTarget::LinkInterface const* cmGeneratorTarget::GetLinkInterface( { iface.LibrariesDone = true; this->ComputeLinkInterfaceLibraries( - this->Target, config, iface, head, false); + config, iface, head, false); } if(!iface.AllDone) { iface.AllDone = true; if(iface.Exists) { - this->ComputeLinkInterface(this->Target, config, iface, head); + this->ComputeLinkInterface(config, iface, head); } } @@ -3421,7 +3466,7 @@ cmGeneratorTarget::GetLinkInterfaceLibraries(const std::string& config, { iface.LibrariesDone = true; this->ComputeLinkInterfaceLibraries( - this->Target, config, iface, head, usage_requirements_only); + config, iface, head, usage_requirements_only); } return iface.Exists? &iface : 0; @@ -3458,13 +3503,13 @@ cmGeneratorTarget::GetImportLinkInterface(const std::string& config, iface.AllDone = true; iface.Multiplicity = info->Multiplicity; cmSystemTools::ExpandListArgument(info->Languages, iface.Languages); - this->Target->ExpandLinkItems(info->LibrariesProp, info->Libraries, config, + this->ExpandLinkItems(info->LibrariesProp, info->Libraries, config, headTarget, usage_requirements_only, iface.Libraries, iface.HadHeadSensitiveCondition); std::vector<std::string> deps; cmSystemTools::ExpandListArgument(info->SharedDeps, deps); - this->Target->LookupLinkItems(deps, iface.SharedDeps); + this->LookupLinkItems(deps, iface.SharedDeps); } return &iface; @@ -3473,7 +3518,6 @@ cmGeneratorTarget::GetImportLinkInterface(const std::string& config, //---------------------------------------------------------------------------- void cmGeneratorTarget::ComputeLinkInterfaceLibraries( - cmTarget const* thisTarget, const std::string& config, OptionalLinkInterface& iface, cmTarget const* headTarget, @@ -3494,15 +3538,15 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries( // libraries and executables that export symbols. const char* explicitLibraries = 0; std::string linkIfaceProp; - if(thisTarget->GetPolicyStatusCMP0022() != cmPolicies::OLD && - thisTarget->GetPolicyStatusCMP0022() != cmPolicies::WARN) + if(this->Target->GetPolicyStatusCMP0022() != cmPolicies::OLD && + this->Target->GetPolicyStatusCMP0022() != cmPolicies::WARN) { // CMP0022 NEW behavior is to use INTERFACE_LINK_LIBRARIES. linkIfaceProp = "INTERFACE_LINK_LIBRARIES"; - explicitLibraries = thisTarget->GetProperty(linkIfaceProp); + explicitLibraries = this->Target->GetProperty(linkIfaceProp); } - else if(thisTarget->GetType() == cmTarget::SHARED_LIBRARY || - thisTarget->IsExecutableWithExports()) + else if(this->Target->GetType() == cmTarget::SHARED_LIBRARY || + this->Target->IsExecutableWithExports()) { // CMP0022 OLD behavior is to use LINK_INTERFACE_LIBRARIES if set on a // shared lib or executable. @@ -3510,30 +3554,30 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries( // Lookup the per-configuration property. linkIfaceProp = "LINK_INTERFACE_LIBRARIES"; linkIfaceProp += suffix; - explicitLibraries = thisTarget->GetProperty(linkIfaceProp); + explicitLibraries = this->Target->GetProperty(linkIfaceProp); // If not set, try the generic property. if(!explicitLibraries) { linkIfaceProp = "LINK_INTERFACE_LIBRARIES"; - explicitLibraries = thisTarget->GetProperty(linkIfaceProp); + explicitLibraries = this->Target->GetProperty(linkIfaceProp); } } if(explicitLibraries && - thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN && + this->Target->GetPolicyStatusCMP0022() == cmPolicies::WARN && !this->PolicyWarnedCMP0022) { // Compare the explicitly set old link interface properties to the // preferred new link interface property one and warn if different. const char* newExplicitLibraries = - thisTarget->GetProperty("INTERFACE_LINK_LIBRARIES"); + this->Target->GetProperty("INTERFACE_LINK_LIBRARIES"); if (newExplicitLibraries && strcmp(newExplicitLibraries, explicitLibraries) != 0) { std::ostringstream w; w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0022) << "\n" - "Target \"" << thisTarget->GetName() << "\" has an " + "Target \"" << this->Target->GetName() << "\" has an " "INTERFACE_LINK_LIBRARIES property which differs from its " << linkIfaceProp << " properties." "\n" @@ -3541,7 +3585,7 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries( " " << newExplicitLibraries << "\n" << linkIfaceProp << ":\n" " " << (explicitLibraries ? explicitLibraries : "(empty)") << "\n"; - thisTarget->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); + this->Target->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); this->PolicyWarnedCMP0022 = true; } } @@ -3549,8 +3593,8 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries( // There is no implicit link interface for executables or modules // so if none was explicitly set then there is no link interface. if(!explicitLibraries && - (thisTarget->GetType() == cmTarget::EXECUTABLE || - (thisTarget->GetType() == cmTarget::MODULE_LIBRARY))) + (this->Target->GetType() == cmTarget::EXECUTABLE || + (this->Target->GetType() == cmTarget::MODULE_LIBRARY))) { return; } @@ -3560,13 +3604,13 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries( if(explicitLibraries) { // The interface libraries have been explicitly set. - thisTarget->ExpandLinkItems(linkIfaceProp, explicitLibraries, config, + this->ExpandLinkItems(linkIfaceProp, explicitLibraries, config, headTarget, usage_requirements_only, iface.Libraries, iface.HadHeadSensitiveCondition); } - else if (thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN - || thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD) + else if (this->Target->GetPolicyStatusCMP0022() == cmPolicies::WARN + || this->Target->GetPolicyStatusCMP0022() == cmPolicies::OLD) // If CMP0022 is NEW then the plain tll signature sets the // INTERFACE_LINK_LIBRARIES, so if we get here then the project // cleared the property explicitly and we should not fall back @@ -3574,20 +3618,20 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries( { // The link implementation is the default link interface. cmLinkImplementationLibraries const* impl = - thisTarget->GetLinkImplementationLibrariesInternal(config, headTarget); + this->Target->GetLinkImplementationLibrariesInternal(config, headTarget); iface.Libraries.insert(iface.Libraries.end(), impl->Libraries.begin(), impl->Libraries.end()); - if(thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN && + if(this->Target->GetPolicyStatusCMP0022() == cmPolicies::WARN && !this->PolicyWarnedCMP0022 && !usage_requirements_only) { // Compare the link implementation fallback link interface to the // preferred new link interface property and warn if different. std::vector<cmLinkItem> ifaceLibs; static const std::string newProp = "INTERFACE_LINK_LIBRARIES"; - if(const char* newExplicitLibraries = thisTarget->GetProperty(newProp)) + if(const char* newExplicitLibraries = this->Target->GetProperty(newProp)) { bool hadHeadSensitiveConditionDummy = false; - thisTarget->ExpandLinkItems(newProp, newExplicitLibraries, config, + this->ExpandLinkItems(newProp, newExplicitLibraries, config, headTarget, usage_requirements_only, ifaceLibs, hadHeadSensitiveConditionDummy); } @@ -3602,7 +3646,7 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries( std::ostringstream w; w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0022) << "\n" - "Target \"" << thisTarget->GetName() << "\" has an " + "Target \"" << this->Target->GetName() << "\" has an " "INTERFACE_LINK_LIBRARIES property. " "This should be preferred as the source of the link interface " "for this library but because CMP0022 is not set CMake is " @@ -3613,7 +3657,7 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries( " " << newLibraries << "\n" "Link implementation:\n" " " << oldLibraries << "\n"; - thisTarget->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); + this->Target->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); this->PolicyWarnedCMP0022 = true; } } @@ -3621,16 +3665,15 @@ cmGeneratorTarget::ComputeLinkInterfaceLibraries( } //---------------------------------------------------------------------------- -void cmGeneratorTarget::ComputeLinkInterface(cmTarget const* thisTarget, - const std::string& config, +void cmGeneratorTarget::ComputeLinkInterface(const std::string& config, OptionalLinkInterface& iface, cmTarget const* headTarget) const { if(iface.ExplicitLibraries) { - if(thisTarget->GetType() == cmTarget::SHARED_LIBRARY - || thisTarget->GetType() == cmTarget::STATIC_LIBRARY - || thisTarget->GetType() == cmTarget::INTERFACE_LIBRARY) + if(this->GetType() == cmTarget::SHARED_LIBRARY + || this->GetType() == cmTarget::STATIC_LIBRARY + || this->GetType() == cmTarget::INTERFACE_LIBRARY) { // Shared libraries may have runtime implementation dependencies // on other shared libraries that are not in the interface. @@ -3640,10 +3683,10 @@ void cmGeneratorTarget::ComputeLinkInterface(cmTarget const* thisTarget, { emitted.insert(*li); } - if (thisTarget->GetType() != cmTarget::INTERFACE_LIBRARY) + if (this->GetType() != cmTarget::INTERFACE_LIBRARY) { cmTarget::LinkImplementation const* impl = - thisTarget->GetLinkImplementation(config); + this->Target->GetLinkImplementation(config); for(std::vector<cmLinkImplItem>::const_iterator li = impl->Libraries.begin(); li != impl->Libraries.end(); ++li) { @@ -3669,28 +3712,28 @@ void cmGeneratorTarget::ComputeLinkInterface(cmTarget const* thisTarget, } } } - else if (thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN - || thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD) + else if (this->Target->GetPolicyStatusCMP0022() == cmPolicies::WARN + || this->Target->GetPolicyStatusCMP0022() == cmPolicies::OLD) { // The link implementation is the default link interface. cmLinkImplementationLibraries const* - impl = thisTarget->GetLinkImplementationLibrariesInternal(config, + impl = this->Target->GetLinkImplementationLibrariesInternal(config, headTarget); iface.ImplementationIsInterface = true; iface.WrongConfigLibraries = impl->WrongConfigLibraries; } - if(thisTarget->LinkLanguagePropagatesToDependents()) + if(this->Target->LinkLanguagePropagatesToDependents()) { // Targets using this archive need its language runtime libraries. if(cmTarget::LinkImplementation const* impl = - thisTarget->GetLinkImplementation(config)) + this->Target->GetLinkImplementation(config)) { iface.Languages = impl->Languages; } } - if(thisTarget->GetType() == cmTarget::STATIC_LIBRARY) + if(this->GetType() == cmTarget::STATIC_LIBRARY) { // Construct the property name suffix for this configuration. std::string suffix = "_"; @@ -3707,12 +3750,12 @@ void cmGeneratorTarget::ComputeLinkInterface(cmTarget const* thisTarget, // dependencies? std::string propName = "LINK_INTERFACE_MULTIPLICITY"; propName += suffix; - if(const char* config_reps = thisTarget->GetProperty(propName)) + if(const char* config_reps = this->Target->GetProperty(propName)) { sscanf(config_reps, "%u", &iface.Multiplicity); } else if(const char* reps = - thisTarget->GetProperty("LINK_INTERFACE_MULTIPLICITY")) + this->Target->GetProperty("LINK_INTERFACE_MULTIPLICITY")) { sscanf(reps, "%u", &iface.Multiplicity); } diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 94402ed..24163b6 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -431,12 +431,10 @@ private: bool HadHeadSensitiveCondition; const char* ExplicitLibraries; }; - void ComputeLinkInterface(cmTarget const* thisTarget, - const std::string& config, + void ComputeLinkInterface(const std::string& config, OptionalLinkInterface& iface, cmTarget const* head) const; - void ComputeLinkInterfaceLibraries(cmTarget const* thisTarget, - const std::string& config, + void ComputeLinkInterfaceLibraries(const std::string& config, OptionalLinkInterface& iface, cmTarget const* head, bool usage_requirements_only) const; @@ -450,6 +448,14 @@ private: mutable bool PolicyWarnedCMP0022; + void ExpandLinkItems(std::string const& prop, std::string const& value, + std::string const& config, cmTarget const* headTarget, + bool usage_requirements_only, + std::vector<cmLinkItem>& items, + bool& hadHeadSensitiveCondition) const; + void LookupLinkItems(std::vector<std::string> const& names, + std::vector<cmLinkItem>& items) const; + public: std::vector<cmTarget const*> const& GetLinkImplementationClosure(const std::string& config) const; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index eceabd0..ba72fdc 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3033,51 +3033,6 @@ bool cmTarget::GetPropertyAsBool(const std::string& prop) const } //---------------------------------------------------------------------------- -void cmTarget::ExpandLinkItems(std::string const& prop, - std::string const& value, - std::string const& config, - cmTarget const* headTarget, - bool usage_requirements_only, - std::vector<cmLinkItem>& items, - bool& hadHeadSensitiveCondition) const -{ - cmGeneratorExpression ge; - cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), prop, 0, 0); - // The $<LINK_ONLY> expression may be in a link interface to specify private - // link dependencies that are otherwise excluded from usage requirements. - if(usage_requirements_only) - { - dagChecker.SetTransitivePropertiesOnly(); - } - std::vector<std::string> libs; - cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value); - cmSystemTools::ExpandListArgument(cge->Evaluate( - this->Makefile, - config, - false, - headTarget, - this, &dagChecker), libs); - this->LookupLinkItems(libs, items); - hadHeadSensitiveCondition = cge->GetHadHeadSensitiveCondition(); -} - -//---------------------------------------------------------------------------- -void cmTarget::LookupLinkItems(std::vector<std::string> const& names, - std::vector<cmLinkItem>& items) const -{ - for(std::vector<std::string>::const_iterator i = names.begin(); - i != names.end(); ++i) - { - std::string name = this->CheckCMP0004(*i); - if(name == this->GetName() || name.empty()) - { - continue; - } - items.push_back(cmLinkItem(name, this->FindTargetToLink(name))); - } -} - -//---------------------------------------------------------------------------- const char* cmTarget::GetSuffixVariableInternal(bool implib) const { switch(this->GetType()) diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 84395e3..3e689ae 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -557,14 +557,6 @@ private: GetLinkImplementationLibrariesInternal(const std::string& config, cmTarget const* head) const; - void ExpandLinkItems(std::string const& prop, std::string const& value, - std::string const& config, cmTarget const* headTarget, - bool usage_requirements_only, - std::vector<cmLinkItem>& items, - bool& hadHeadSensitiveCondition) const; - void LookupLinkItems(std::vector<std::string> const& names, - std::vector<cmLinkItem>& items) const; - std::string ProcessSourceItemCMP0049(const std::string& s); void ClearLinkMaps(); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae94ca1c5902dc12ddd7eb7a9e4b197ddde5c884 commit ae94ca1c5902dc12ddd7eb7a9e4b197ddde5c884 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 19:22:30 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 00:59:35 2015 +0200 cmGeneratorTarget: Move GetLinkInterface from cmTarget. diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 8ba8847..b657765 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -363,8 +363,10 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe) if(entry.Target) { // Follow the target dependencies. - if(cmTarget::LinkInterface const* iface = - entry.Target->GetLinkInterface(this->Config, this->Target->Target)) + cmGeneratorTarget* gtgt = + this->GlobalGenerator->GetGeneratorTarget(entry.Target); + if(cmGeneratorTarget::LinkInterface const* iface = + gtgt->GetLinkInterface(this->Config, this->Target->Target)) { const bool isIface = entry.Target->GetType() == cmTarget::INTERFACE_LIBRARY; @@ -398,7 +400,8 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe) //---------------------------------------------------------------------------- void cmComputeLinkDepends -::FollowSharedDeps(int depender_index, cmTarget::LinkInterface const* iface, +::FollowSharedDeps(int depender_index, + cmGeneratorTarget::LinkInterface const* iface, bool follow_interface) { // Follow dependencies if we have not followed them already. @@ -461,8 +464,10 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep) // Target items may have their own dependencies. if(entry.Target) { - if(cmTarget::LinkInterface const* iface = - entry.Target->GetLinkInterface(this->Config, this->Target->Target)) + cmGeneratorTarget* gtgt = + this->GlobalGenerator->GetGeneratorTarget(entry.Target); + if(cmGeneratorTarget::LinkInterface const* iface = + gtgt->GetLinkInterface(this->Config, this->Target->Target)) { // Follow public and private dependencies transitively. this->FollowSharedDeps(index, iface, true); @@ -932,8 +937,10 @@ int cmComputeLinkDepends::ComputeComponentCount(NodeList const& nl) { if(cmTarget const* target = this->EntryList[*ni].Target) { - if(cmTarget::LinkInterface const* iface = - target->GetLinkInterface(this->Config, this->Target->Target)) + cmGeneratorTarget* gtgt = + this->GlobalGenerator->GetGeneratorTarget(target); + if(cmGeneratorTarget::LinkInterface const* iface = + gtgt->GetLinkInterface(this->Config, this->Target->Target)) { if(iface->Multiplicity > count) { diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index b925a4f..e61175a 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -13,6 +13,7 @@ #define cmComputeLinkDepends_h #include "cmStandardIncludes.h" +#include "cmGeneratorTarget.h" #include "cmTarget.h" #include "cmGraphAdjacencyList.h" @@ -22,8 +23,6 @@ class cmComputeComponentGraph; class cmGlobalGenerator; class cmMakefile; -class cmGeneratorTarget; -class cmTarget; class cmake; /** \class cmComputeLinkDepends @@ -102,7 +101,7 @@ private: std::queue<SharedDepEntry> SharedDepQueue; std::set<int> SharedDepFollowed; void FollowSharedDeps(int depender_index, - cmTarget::LinkInterface const* iface, + cmGeneratorTarget::LinkInterface const* iface, bool follow_interface = false); void QueueSharedDependencies(int depender_index, std::vector<cmLinkItem> const& deps); diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index c4a03a0..fd4b567 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -296,8 +296,8 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index, std::set<std::string> &emitted) { cmGeneratorTarget const* depender = this->Targets[depender_index]; - if(cmTarget::LinkInterface const* iface = - dependee->Target->GetLinkInterface(config, + if(cmGeneratorTarget::LinkInterface const* iface = + dependee->GetLinkInterface(config, depender->Target)) { for(std::vector<cmLinkItem>::const_iterator diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index cae60b7..97eb6b9 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -796,7 +796,7 @@ cmExportFileGenerator std::vector<std::string>& missingTargets) { // Add the transitive link dependencies for this configuration. - cmTarget::LinkInterface const* iface = target->Target->GetLinkInterface( + cmGeneratorTarget::LinkInterface const* iface = target->GetLinkInterface( config, target->Target); if (!iface) @@ -909,9 +909,8 @@ cmExportFileGenerator } // Add the transitive link dependencies for this configuration. - if(cmTarget::LinkInterface const* iface = - target->Target - ->GetLinkInterface(config, target->Target)) + if(cmGeneratorTarget::LinkInterface const* iface = + target->GetLinkInterface(config, target->Target)) { this->SetImportLinkProperty(suffix, target, "IMPORTED_LINK_INTERFACE_LANGUAGES", diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 49f2515..c097bfb 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1108,8 +1108,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode if(isInterfaceProperty) { - if(cmTarget::LinkInterfaceLibraries const* iface = - target->GetLinkInterfaceLibraries(context->Config, headTarget, true)) + if(cmGeneratorTarget::LinkInterfaceLibraries const* iface = + gtgt->GetLinkInterfaceLibraries(context->Config, headTarget, true)) { linkedTargetsContent = getLinkedTargetsContent(iface->Libraries, target, diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index aed2c07..27d6a99 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1144,8 +1144,11 @@ public: return; } - cmTarget::LinkInterface const* iface = - item.Target->GetLinkInterface(this->Config, this->HeadTarget); + cmGeneratorTarget* gtgt = + this->Target->GetLocalGenerator()->GetGlobalGenerator() + ->GetGeneratorTarget(item.Target); + cmGeneratorTarget::LinkInterface const* iface = + gtgt->GetLinkInterface(this->Config, this->HeadTarget); if(!iface) { return; } for(std::vector<std::string>::const_iterator @@ -1475,20 +1478,24 @@ void cmGeneratorTarget::GetAutoUicOptions(std::vector<std::string> &result, void processILibs(const std::string& config, cmTarget const* headTarget, cmLinkItem const& item, + cmGeneratorTarget* itemGT, std::vector<cmTarget const*>& tgts, std::set<cmTarget const*>& emitted) { if (item.Target && emitted.insert(item.Target).second) { tgts.push_back(item.Target); - if(cmTarget::LinkInterfaceLibraries const* iface = - item.Target->GetLinkInterfaceLibraries(config, headTarget, true)) + if(cmGeneratorTarget::LinkInterfaceLibraries const* iface = + itemGT->GetLinkInterfaceLibraries(config, headTarget, true)) { for(std::vector<cmLinkItem>::const_iterator it = iface->Libraries.begin(); it != iface->Libraries.end(); ++it) { - processILibs(config, headTarget, *it, tgts, emitted); + cmGeneratorTarget* gtgt = + itemGT->GetLocalGenerator()->GetGlobalGenerator() + ->GetGeneratorTarget(it->Target); + processILibs(config, headTarget, *it, gtgt, tgts, emitted); } } } @@ -1513,7 +1520,10 @@ cmGeneratorTarget::GetLinkImplementationClosure( it = impl->Libraries.begin(); it != impl->Libraries.end(); ++it) { - processILibs(config, this->Target, *it, tgts , emitted); + cmGeneratorTarget* gtgt = + this->GetLocalGenerator()->GetGlobalGenerator() + ->GetGeneratorTarget(it->Target); + processILibs(config, this->Target, *it, gtgt, tgts, emitted); } } return tgts; @@ -3322,3 +3332,389 @@ cmGeneratorTarget::ReportPropertyOrigin(const std::string &p, this->Makefile->GetCMakeInstance()->IssueMessage(cmake::LOG, areport); } + +//---------------------------------------------------------------------------- +cmGeneratorTarget::LinkInterface const* cmGeneratorTarget::GetLinkInterface( + const std::string& config, + cmTarget const* head) const +{ + // Imported targets have their own link interface. + if(this->Target->IsImported()) + { + return this->GetImportLinkInterface(config, head, false); + } + + // Link interfaces are not supported for executables that do not + // export symbols. + if(this->GetType() == cmTarget::EXECUTABLE && + !this->Target->IsExecutableWithExports()) + { + return 0; + } + + // Lookup any existing link interface for this configuration. + std::string CONFIG = cmSystemTools::UpperCase(config); + HeadToLinkInterfaceMap& hm = this->LinkInterfaceMap[CONFIG]; + + // If the link interface does not depend on the head target + // then return the one we computed first. + if(!hm.empty() && !hm.begin()->second.HadHeadSensitiveCondition) + { + return &hm.begin()->second; + } + + OptionalLinkInterface& iface = hm[head]; + if(!iface.LibrariesDone) + { + iface.LibrariesDone = true; + this->ComputeLinkInterfaceLibraries( + this->Target, config, iface, head, false); + } + if(!iface.AllDone) + { + iface.AllDone = true; + if(iface.Exists) + { + this->ComputeLinkInterface(this->Target, config, iface, head); + } + } + + return iface.Exists? &iface : 0; +} + +//---------------------------------------------------------------------------- +cmGeneratorTarget::LinkInterfaceLibraries const* +cmGeneratorTarget::GetLinkInterfaceLibraries(const std::string& config, + cmTarget const* head, + bool usage_requirements_only) const +{ + // Imported targets have their own link interface. + if(this->Target->IsImported()) + { + return this->GetImportLinkInterface(config, head, usage_requirements_only); + } + + // Link interfaces are not supported for executables that do not + // export symbols. + if(this->GetType() == cmTarget::EXECUTABLE && + !this->Target->IsExecutableWithExports()) + { + return 0; + } + + // Lookup any existing link interface for this configuration. + std::string CONFIG = cmSystemTools::UpperCase(config); + HeadToLinkInterfaceMap& hm = + (usage_requirements_only ? + this->LinkInterfaceUsageRequirementsOnlyMap[CONFIG] : + this->LinkInterfaceMap[CONFIG]); + + // If the link interface does not depend on the head target + // then return the one we computed first. + if(!hm.empty() && !hm.begin()->second.HadHeadSensitiveCondition) + { + return &hm.begin()->second; + } + + OptionalLinkInterface& iface = hm[head]; + if(!iface.LibrariesDone) + { + iface.LibrariesDone = true; + this->ComputeLinkInterfaceLibraries( + this->Target, config, iface, head, usage_requirements_only); + } + + return iface.Exists? &iface : 0; +} + +//---------------------------------------------------------------------------- +cmGeneratorTarget::LinkInterface const* +cmGeneratorTarget::GetImportLinkInterface(const std::string& config, + cmTarget const* headTarget, + bool usage_requirements_only) const +{ + cmTarget::ImportInfo const* info = this->Target->GetImportInfo(config); + if(!info) + { + return 0; + } + + std::string CONFIG = cmSystemTools::UpperCase(config); + HeadToLinkInterfaceMap& hm = + (usage_requirements_only ? + this->LinkInterfaceUsageRequirementsOnlyMap[CONFIG] : + this->LinkInterfaceMap[CONFIG]); + + // If the link interface does not depend on the head target + // then return the one we computed first. + if(!hm.empty() && !hm.begin()->second.HadHeadSensitiveCondition) + { + return &hm.begin()->second; + } + + OptionalLinkInterface& iface = hm[headTarget]; + if(!iface.AllDone) + { + iface.AllDone = true; + iface.Multiplicity = info->Multiplicity; + cmSystemTools::ExpandListArgument(info->Languages, iface.Languages); + this->Target->ExpandLinkItems(info->LibrariesProp, info->Libraries, config, + headTarget, usage_requirements_only, + iface.Libraries, + iface.HadHeadSensitiveCondition); + std::vector<std::string> deps; + cmSystemTools::ExpandListArgument(info->SharedDeps, deps); + this->Target->LookupLinkItems(deps, iface.SharedDeps); + } + + return &iface; +} + +//---------------------------------------------------------------------------- +void +cmGeneratorTarget::ComputeLinkInterfaceLibraries( + cmTarget const* thisTarget, + const std::string& config, + OptionalLinkInterface& iface, + cmTarget const* headTarget, + bool usage_requirements_only) const +{ + // Construct the property name suffix for this configuration. + std::string suffix = "_"; + if(!config.empty()) + { + suffix += cmSystemTools::UpperCase(config); + } + else + { + suffix += "NOCONFIG"; + } + + // An explicit list of interface libraries may be set for shared + // libraries and executables that export symbols. + const char* explicitLibraries = 0; + std::string linkIfaceProp; + if(thisTarget->GetPolicyStatusCMP0022() != cmPolicies::OLD && + thisTarget->GetPolicyStatusCMP0022() != cmPolicies::WARN) + { + // CMP0022 NEW behavior is to use INTERFACE_LINK_LIBRARIES. + linkIfaceProp = "INTERFACE_LINK_LIBRARIES"; + explicitLibraries = thisTarget->GetProperty(linkIfaceProp); + } + else if(thisTarget->GetType() == cmTarget::SHARED_LIBRARY || + thisTarget->IsExecutableWithExports()) + { + // CMP0022 OLD behavior is to use LINK_INTERFACE_LIBRARIES if set on a + // shared lib or executable. + + // Lookup the per-configuration property. + linkIfaceProp = "LINK_INTERFACE_LIBRARIES"; + linkIfaceProp += suffix; + explicitLibraries = thisTarget->GetProperty(linkIfaceProp); + + // If not set, try the generic property. + if(!explicitLibraries) + { + linkIfaceProp = "LINK_INTERFACE_LIBRARIES"; + explicitLibraries = thisTarget->GetProperty(linkIfaceProp); + } + } + + if(explicitLibraries && + thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN && + !this->PolicyWarnedCMP0022) + { + // Compare the explicitly set old link interface properties to the + // preferred new link interface property one and warn if different. + const char* newExplicitLibraries = + thisTarget->GetProperty("INTERFACE_LINK_LIBRARIES"); + if (newExplicitLibraries + && strcmp(newExplicitLibraries, explicitLibraries) != 0) + { + std::ostringstream w; + w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0022) << "\n" + "Target \"" << thisTarget->GetName() << "\" has an " + "INTERFACE_LINK_LIBRARIES property which differs from its " << + linkIfaceProp << " properties." + "\n" + "INTERFACE_LINK_LIBRARIES:\n" + " " << newExplicitLibraries << "\n" << + linkIfaceProp << ":\n" + " " << (explicitLibraries ? explicitLibraries : "(empty)") << "\n"; + thisTarget->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); + this->PolicyWarnedCMP0022 = true; + } + } + + // There is no implicit link interface for executables or modules + // so if none was explicitly set then there is no link interface. + if(!explicitLibraries && + (thisTarget->GetType() == cmTarget::EXECUTABLE || + (thisTarget->GetType() == cmTarget::MODULE_LIBRARY))) + { + return; + } + iface.Exists = true; + iface.ExplicitLibraries = explicitLibraries; + + if(explicitLibraries) + { + // The interface libraries have been explicitly set. + thisTarget->ExpandLinkItems(linkIfaceProp, explicitLibraries, config, + headTarget, usage_requirements_only, + iface.Libraries, + iface.HadHeadSensitiveCondition); + } + else if (thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN + || thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD) + // If CMP0022 is NEW then the plain tll signature sets the + // INTERFACE_LINK_LIBRARIES, so if we get here then the project + // cleared the property explicitly and we should not fall back + // to the link implementation. + { + // The link implementation is the default link interface. + cmLinkImplementationLibraries const* impl = + thisTarget->GetLinkImplementationLibrariesInternal(config, headTarget); + iface.Libraries.insert(iface.Libraries.end(), + impl->Libraries.begin(), impl->Libraries.end()); + if(thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN && + !this->PolicyWarnedCMP0022 && !usage_requirements_only) + { + // Compare the link implementation fallback link interface to the + // preferred new link interface property and warn if different. + std::vector<cmLinkItem> ifaceLibs; + static const std::string newProp = "INTERFACE_LINK_LIBRARIES"; + if(const char* newExplicitLibraries = thisTarget->GetProperty(newProp)) + { + bool hadHeadSensitiveConditionDummy = false; + thisTarget->ExpandLinkItems(newProp, newExplicitLibraries, config, + headTarget, usage_requirements_only, + ifaceLibs, hadHeadSensitiveConditionDummy); + } + if (ifaceLibs != iface.Libraries) + { + std::string oldLibraries = cmJoin(impl->Libraries, ";"); + std::string newLibraries = cmJoin(ifaceLibs, ";"); + if(oldLibraries.empty()) + { oldLibraries = "(empty)"; } + if(newLibraries.empty()) + { newLibraries = "(empty)"; } + + std::ostringstream w; + w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0022) << "\n" + "Target \"" << thisTarget->GetName() << "\" has an " + "INTERFACE_LINK_LIBRARIES property. " + "This should be preferred as the source of the link interface " + "for this library but because CMP0022 is not set CMake is " + "ignoring the property and using the link implementation " + "as the link interface instead." + "\n" + "INTERFACE_LINK_LIBRARIES:\n" + " " << newLibraries << "\n" + "Link implementation:\n" + " " << oldLibraries << "\n"; + thisTarget->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); + this->PolicyWarnedCMP0022 = true; + } + } + } +} + +//---------------------------------------------------------------------------- +void cmGeneratorTarget::ComputeLinkInterface(cmTarget const* thisTarget, + const std::string& config, + OptionalLinkInterface& iface, + cmTarget const* headTarget) const +{ + if(iface.ExplicitLibraries) + { + if(thisTarget->GetType() == cmTarget::SHARED_LIBRARY + || thisTarget->GetType() == cmTarget::STATIC_LIBRARY + || thisTarget->GetType() == cmTarget::INTERFACE_LIBRARY) + { + // Shared libraries may have runtime implementation dependencies + // on other shared libraries that are not in the interface. + UNORDERED_SET<std::string> emitted; + for(std::vector<cmLinkItem>::const_iterator + li = iface.Libraries.begin(); li != iface.Libraries.end(); ++li) + { + emitted.insert(*li); + } + if (thisTarget->GetType() != cmTarget::INTERFACE_LIBRARY) + { + cmTarget::LinkImplementation const* impl = + thisTarget->GetLinkImplementation(config); + for(std::vector<cmLinkImplItem>::const_iterator + li = impl->Libraries.begin(); li != impl->Libraries.end(); ++li) + { + if(emitted.insert(*li).second) + { + if(li->Target) + { + // This is a runtime dependency on another shared library. + if(li->Target->GetType() == cmTarget::SHARED_LIBRARY) + { + iface.SharedDeps.push_back(*li); + } + } + else + { + // TODO: Recognize shared library file names. Perhaps this + // should be moved to cmComputeLinkInformation, but that creates + // a chicken-and-egg problem since this list is needed for its + // construction. + } + } + } + } + } + } + else if (thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN + || thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD) + { + // The link implementation is the default link interface. + cmLinkImplementationLibraries const* + impl = thisTarget->GetLinkImplementationLibrariesInternal(config, + headTarget); + iface.ImplementationIsInterface = true; + iface.WrongConfigLibraries = impl->WrongConfigLibraries; + } + + if(thisTarget->LinkLanguagePropagatesToDependents()) + { + // Targets using this archive need its language runtime libraries. + if(cmTarget::LinkImplementation const* impl = + thisTarget->GetLinkImplementation(config)) + { + iface.Languages = impl->Languages; + } + } + + if(thisTarget->GetType() == cmTarget::STATIC_LIBRARY) + { + // Construct the property name suffix for this configuration. + std::string suffix = "_"; + if(!config.empty()) + { + suffix += cmSystemTools::UpperCase(config); + } + else + { + suffix += "NOCONFIG"; + } + + // How many repetitions are needed if this library has cyclic + // dependencies? + std::string propName = "LINK_INTERFACE_MULTIPLICITY"; + propName += suffix; + if(const char* config_reps = thisTarget->GetProperty(propName)) + { + sscanf(config_reps, "%u", &iface.Multiplicity); + } + else if(const char* reps = + thisTarget->GetProperty("LINK_INTERFACE_MULTIPLICITY")) + { + sscanf(reps, "%u", &iface.Multiplicity); + } + } +} diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 68e7a8a..94402ed 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -13,6 +13,7 @@ #define cmGeneratorTarget_h #include "cmStandardIncludes.h" +#include "cmLinkItem.h" class cmCustomCommand; class cmGlobalGenerator; @@ -106,6 +107,48 @@ public: const char *GetLinkInterfaceDependentNumberMaxProperty(const std::string &p, const std::string& config) const; + /** The link interface specifies transitive library dependencies and + other information needed by targets that link to this target. */ + struct LinkInterfaceLibraries + { + // Libraries listed in the interface. + std::vector<cmLinkItem> Libraries; + }; + + struct LinkInterface: public LinkInterfaceLibraries + { + // Languages whose runtime libraries must be linked. + std::vector<std::string> Languages; + + // Shared library dependencies needed for linking on some platforms. + std::vector<cmLinkItem> SharedDeps; + + // Number of repetitions of a strongly connected component of two + // or more static libraries. + int Multiplicity; + + // Libraries listed for other configurations. + // Needed only for OLD behavior of CMP0003. + std::vector<cmLinkItem> WrongConfigLibraries; + + bool ImplementationIsInterface; + + LinkInterface(): Multiplicity(0), ImplementationIsInterface(false) {} + }; + + /** Get the link interface for the given configuration. Returns 0 + if the target cannot be linked. */ + LinkInterface const* GetLinkInterface(const std::string& config, + cmTarget const* headTarget) const; + + LinkInterface const* + GetImportLinkInterface(const std::string& config, cmTarget const* head, + bool usage_requirements_only) const; + + LinkInterfaceLibraries const* + GetLinkInterfaceLibraries(const std::string& config, + cmTarget const* headTarget, + bool usage_requirements_only) const; /** Get the full path to the target according to the settings in its makefile and the configuration type. */ @@ -375,6 +418,38 @@ private: }; mutable std::map<std::string, LinkImplClosure> LinkImplClosureMap; + // Cache link interface computation from each configuration. + struct OptionalLinkInterface: public LinkInterface + { + OptionalLinkInterface(): + LibrariesDone(false), AllDone(false), + Exists(false), HadHeadSensitiveCondition(false), + ExplicitLibraries(0) {} + bool LibrariesDone; + bool AllDone; + bool Exists; + bool HadHeadSensitiveCondition; + const char* ExplicitLibraries; + }; + void ComputeLinkInterface(cmTarget const* thisTarget, + const std::string& config, + OptionalLinkInterface& iface, + cmTarget const* head) const; + void ComputeLinkInterfaceLibraries(cmTarget const* thisTarget, + const std::string& config, + OptionalLinkInterface& iface, + cmTarget const* head, + bool usage_requirements_only) const; + + struct HeadToLinkInterfaceMap: + public std::map<cmTarget const*, OptionalLinkInterface> {}; + typedef std::map<std::string, HeadToLinkInterfaceMap> + LinkInterfaceMapType; + mutable LinkInterfaceMapType LinkInterfaceMap; + mutable LinkInterfaceMapType LinkInterfaceUsageRequirementsOnlyMap; + + mutable bool PolicyWarnedCMP0022; + public: std::vector<cmTarget const*> const& GetLinkImplementationClosure(const std::string& config) const; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1d4313e..eceabd0 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -75,13 +75,11 @@ public: cmTargetInternals() : Backtrace() { - this->PolicyWarnedCMP0022 = false; this->UtilityItemsDone = false; } cmTargetInternals(cmTargetInternals const&) : Backtrace() { - this->PolicyWarnedCMP0022 = false; this->UtilityItemsDone = false; } ~cmTargetInternals(); @@ -89,36 +87,6 @@ public: // The backtrace when the target was created. cmListFileBacktrace Backtrace; - // Cache link interface computation from each configuration. - struct OptionalLinkInterface: public cmTarget::LinkInterface - { - OptionalLinkInterface(): - LibrariesDone(false), AllDone(false), - Exists(false), HadHeadSensitiveCondition(false), - ExplicitLibraries(0) {} - bool LibrariesDone; - bool AllDone; - bool Exists; - bool HadHeadSensitiveCondition; - const char* ExplicitLibraries; - }; - void ComputeLinkInterface(cmTarget const* thisTarget, - const std::string& config, - OptionalLinkInterface& iface, - cmTarget const* head) const; - void ComputeLinkInterfaceLibraries(cmTarget const* thisTarget, - const std::string& config, - OptionalLinkInterface& iface, - cmTarget const* head, - bool usage_requirements_only); - - struct HeadToLinkInterfaceMap: - public std::map<cmTarget const*, OptionalLinkInterface> {}; - typedef std::map<std::string, HeadToLinkInterfaceMap> - LinkInterfaceMapType; - LinkInterfaceMapType LinkInterfaceMap; - LinkInterfaceMapType LinkInterfaceUsageRequirementsOnlyMap; - bool PolicyWarnedCMP0022; typedef std::map<std::string, cmTarget::OutputInfo> OutputInfoMapType; OutputInfoMapType OutputInfoMap; @@ -497,8 +465,6 @@ void cmTarget::ClearLinkMaps() { this->LinkImplementationLanguageIsContextDependent = true; this->Internal->LinkImplMap.clear(); - this->Internal->LinkInterfaceMap.clear(); - this->Internal->LinkInterfaceUsageRequirementsOnlyMap.clear(); this->Internal->SourceFilesMap.clear(); } @@ -4091,393 +4057,6 @@ void cmTarget::ComputeImportInfo(std::string const& desired_config, } //---------------------------------------------------------------------------- -cmTarget::LinkInterface const* cmTarget::GetLinkInterface( - const std::string& config, - cmTarget const* head) const -{ - // Imported targets have their own link interface. - if(this->IsImported()) - { - return this->GetImportLinkInterface(config, head, false); - } - - // Link interfaces are not supported for executables that do not - // export symbols. - if(this->GetType() == cmTarget::EXECUTABLE && - !this->IsExecutableWithExports()) - { - return 0; - } - - // Lookup any existing link interface for this configuration. - std::string CONFIG = cmSystemTools::UpperCase(config); - cmTargetInternals::HeadToLinkInterfaceMap& hm = - this->Internal->LinkInterfaceMap[CONFIG]; - - // If the link interface does not depend on the head target - // then return the one we computed first. - if(!hm.empty() && !hm.begin()->second.HadHeadSensitiveCondition) - { - return &hm.begin()->second; - } - - cmTargetInternals::OptionalLinkInterface& iface = hm[head]; - if(!iface.LibrariesDone) - { - iface.LibrariesDone = true; - this->Internal->ComputeLinkInterfaceLibraries( - this, config, iface, head, false); - } - if(!iface.AllDone) - { - iface.AllDone = true; - if(iface.Exists) - { - this->Internal->ComputeLinkInterface(this, config, iface, head); - } - } - - return iface.Exists? &iface : 0; -} - -//---------------------------------------------------------------------------- -cmTarget::LinkInterfaceLibraries const* -cmTarget::GetLinkInterfaceLibraries(const std::string& config, - cmTarget const* head, - bool usage_requirements_only) const -{ - // Imported targets have their own link interface. - if(this->IsImported()) - { - return this->GetImportLinkInterface(config, head, usage_requirements_only); - } - - // Link interfaces are not supported for executables that do not - // export symbols. - if(this->GetType() == cmTarget::EXECUTABLE && - !this->IsExecutableWithExports()) - { - return 0; - } - - // Lookup any existing link interface for this configuration. - std::string CONFIG = cmSystemTools::UpperCase(config); - cmTargetInternals::HeadToLinkInterfaceMap& hm = - (usage_requirements_only ? - this->Internal->LinkInterfaceUsageRequirementsOnlyMap[CONFIG] : - this->Internal->LinkInterfaceMap[CONFIG]); - - // If the link interface does not depend on the head target - // then return the one we computed first. - if(!hm.empty() && !hm.begin()->second.HadHeadSensitiveCondition) - { - return &hm.begin()->second; - } - - cmTargetInternals::OptionalLinkInterface& iface = hm[head]; - if(!iface.LibrariesDone) - { - iface.LibrariesDone = true; - this->Internal->ComputeLinkInterfaceLibraries( - this, config, iface, head, usage_requirements_only); - } - - return iface.Exists? &iface : 0; -} - -//---------------------------------------------------------------------------- -cmTarget::LinkInterface const* -cmTarget::GetImportLinkInterface(const std::string& config, - cmTarget const* headTarget, - bool usage_requirements_only) const -{ - cmTarget::ImportInfo const* info = this->GetImportInfo(config); - if(!info) - { - return 0; - } - - std::string CONFIG = cmSystemTools::UpperCase(config); - cmTargetInternals::HeadToLinkInterfaceMap& hm = - (usage_requirements_only ? - this->Internal->LinkInterfaceUsageRequirementsOnlyMap[CONFIG] : - this->Internal->LinkInterfaceMap[CONFIG]); - - // If the link interface does not depend on the head target - // then return the one we computed first. - if(!hm.empty() && !hm.begin()->second.HadHeadSensitiveCondition) - { - return &hm.begin()->second; - } - - cmTargetInternals::OptionalLinkInterface& iface = hm[headTarget]; - if(!iface.AllDone) - { - iface.AllDone = true; - iface.Multiplicity = info->Multiplicity; - cmSystemTools::ExpandListArgument(info->Languages, iface.Languages); - this->ExpandLinkItems(info->LibrariesProp, info->Libraries, config, - headTarget, usage_requirements_only, - iface.Libraries, - iface.HadHeadSensitiveCondition); - std::vector<std::string> deps; - cmSystemTools::ExpandListArgument(info->SharedDeps, deps); - this->LookupLinkItems(deps, iface.SharedDeps); - } - - return &iface; -} - -//---------------------------------------------------------------------------- -void -cmTargetInternals::ComputeLinkInterfaceLibraries( - cmTarget const* thisTarget, - const std::string& config, - OptionalLinkInterface& iface, - cmTarget const* headTarget, - bool usage_requirements_only) -{ - // Construct the property name suffix for this configuration. - std::string suffix = "_"; - if(!config.empty()) - { - suffix += cmSystemTools::UpperCase(config); - } - else - { - suffix += "NOCONFIG"; - } - - // An explicit list of interface libraries may be set for shared - // libraries and executables that export symbols. - const char* explicitLibraries = 0; - std::string linkIfaceProp; - if(thisTarget->GetPolicyStatusCMP0022() != cmPolicies::OLD && - thisTarget->GetPolicyStatusCMP0022() != cmPolicies::WARN) - { - // CMP0022 NEW behavior is to use INTERFACE_LINK_LIBRARIES. - linkIfaceProp = "INTERFACE_LINK_LIBRARIES"; - explicitLibraries = thisTarget->GetProperty(linkIfaceProp); - } - else if(thisTarget->GetType() == cmTarget::SHARED_LIBRARY || - thisTarget->IsExecutableWithExports()) - { - // CMP0022 OLD behavior is to use LINK_INTERFACE_LIBRARIES if set on a - // shared lib or executable. - - // Lookup the per-configuration property. - linkIfaceProp = "LINK_INTERFACE_LIBRARIES"; - linkIfaceProp += suffix; - explicitLibraries = thisTarget->GetProperty(linkIfaceProp); - - // If not set, try the generic property. - if(!explicitLibraries) - { - linkIfaceProp = "LINK_INTERFACE_LIBRARIES"; - explicitLibraries = thisTarget->GetProperty(linkIfaceProp); - } - } - - if(explicitLibraries && - thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN && - !this->PolicyWarnedCMP0022) - { - // Compare the explicitly set old link interface properties to the - // preferred new link interface property one and warn if different. - const char* newExplicitLibraries = - thisTarget->GetProperty("INTERFACE_LINK_LIBRARIES"); - if (newExplicitLibraries - && strcmp(newExplicitLibraries, explicitLibraries) != 0) - { - std::ostringstream w; - w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0022) << "\n" - "Target \"" << thisTarget->GetName() << "\" has an " - "INTERFACE_LINK_LIBRARIES property which differs from its " << - linkIfaceProp << " properties." - "\n" - "INTERFACE_LINK_LIBRARIES:\n" - " " << newExplicitLibraries << "\n" << - linkIfaceProp << ":\n" - " " << (explicitLibraries ? explicitLibraries : "(empty)") << "\n"; - thisTarget->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); - this->PolicyWarnedCMP0022 = true; - } - } - - // There is no implicit link interface for executables or modules - // so if none was explicitly set then there is no link interface. - if(!explicitLibraries && - (thisTarget->GetType() == cmTarget::EXECUTABLE || - (thisTarget->GetType() == cmTarget::MODULE_LIBRARY))) - { - return; - } - iface.Exists = true; - iface.ExplicitLibraries = explicitLibraries; - - if(explicitLibraries) - { - // The interface libraries have been explicitly set. - thisTarget->ExpandLinkItems(linkIfaceProp, explicitLibraries, config, - headTarget, usage_requirements_only, - iface.Libraries, - iface.HadHeadSensitiveCondition); - } - else if (thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN - || thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD) - // If CMP0022 is NEW then the plain tll signature sets the - // INTERFACE_LINK_LIBRARIES, so if we get here then the project - // cleared the property explicitly and we should not fall back - // to the link implementation. - { - // The link implementation is the default link interface. - cmLinkImplementationLibraries const* impl = - thisTarget->GetLinkImplementationLibrariesInternal(config, headTarget); - iface.Libraries.insert(iface.Libraries.end(), - impl->Libraries.begin(), impl->Libraries.end()); - if(thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN && - !this->PolicyWarnedCMP0022 && !usage_requirements_only) - { - // Compare the link implementation fallback link interface to the - // preferred new link interface property and warn if different. - std::vector<cmLinkItem> ifaceLibs; - static const std::string newProp = "INTERFACE_LINK_LIBRARIES"; - if(const char* newExplicitLibraries = thisTarget->GetProperty(newProp)) - { - bool hadHeadSensitiveConditionDummy = false; - thisTarget->ExpandLinkItems(newProp, newExplicitLibraries, config, - headTarget, usage_requirements_only, - ifaceLibs, hadHeadSensitiveConditionDummy); - } - if (ifaceLibs != iface.Libraries) - { - std::string oldLibraries = cmJoin(impl->Libraries, ";"); - std::string newLibraries = cmJoin(ifaceLibs, ";"); - if(oldLibraries.empty()) - { oldLibraries = "(empty)"; } - if(newLibraries.empty()) - { newLibraries = "(empty)"; } - - std::ostringstream w; - w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0022) << "\n" - "Target \"" << thisTarget->GetName() << "\" has an " - "INTERFACE_LINK_LIBRARIES property. " - "This should be preferred as the source of the link interface " - "for this library but because CMP0022 is not set CMake is " - "ignoring the property and using the link implementation " - "as the link interface instead." - "\n" - "INTERFACE_LINK_LIBRARIES:\n" - " " << newLibraries << "\n" - "Link implementation:\n" - " " << oldLibraries << "\n"; - thisTarget->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); - this->PolicyWarnedCMP0022 = true; - } - } - } -} - -//---------------------------------------------------------------------------- -void cmTargetInternals::ComputeLinkInterface(cmTarget const* thisTarget, - const std::string& config, - OptionalLinkInterface& iface, - cmTarget const* headTarget) const -{ - if(iface.ExplicitLibraries) - { - if(thisTarget->GetType() == cmTarget::SHARED_LIBRARY - || thisTarget->GetType() == cmTarget::STATIC_LIBRARY - || thisTarget->GetType() == cmTarget::INTERFACE_LIBRARY) - { - // Shared libraries may have runtime implementation dependencies - // on other shared libraries that are not in the interface. - UNORDERED_SET<std::string> emitted; - for(std::vector<cmLinkItem>::const_iterator - li = iface.Libraries.begin(); li != iface.Libraries.end(); ++li) - { - emitted.insert(*li); - } - if (thisTarget->GetType() != cmTarget::INTERFACE_LIBRARY) - { - cmTarget::LinkImplementation const* impl = - thisTarget->GetLinkImplementation(config); - for(std::vector<cmLinkImplItem>::const_iterator - li = impl->Libraries.begin(); li != impl->Libraries.end(); ++li) - { - if(emitted.insert(*li).second) - { - if(li->Target) - { - // This is a runtime dependency on another shared library. - if(li->Target->GetType() == cmTarget::SHARED_LIBRARY) - { - iface.SharedDeps.push_back(*li); - } - } - else - { - // TODO: Recognize shared library file names. Perhaps this - // should be moved to cmComputeLinkInformation, but that creates - // a chicken-and-egg problem since this list is needed for its - // construction. - } - } - } - } - } - } - else if (thisTarget->GetPolicyStatusCMP0022() == cmPolicies::WARN - || thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD) - { - // The link implementation is the default link interface. - cmLinkImplementationLibraries const* - impl = thisTarget->GetLinkImplementationLibrariesInternal(config, - headTarget); - iface.ImplementationIsInterface = true; - iface.WrongConfigLibraries = impl->WrongConfigLibraries; - } - - if(thisTarget->LinkLanguagePropagatesToDependents()) - { - // Targets using this archive need its language runtime libraries. - if(cmTarget::LinkImplementation const* impl = - thisTarget->GetLinkImplementation(config)) - { - iface.Languages = impl->Languages; - } - } - - if(thisTarget->GetType() == cmTarget::STATIC_LIBRARY) - { - // Construct the property name suffix for this configuration. - std::string suffix = "_"; - if(!config.empty()) - { - suffix += cmSystemTools::UpperCase(config); - } - else - { - suffix += "NOCONFIG"; - } - - // How many repetitions are needed if this library has cyclic - // dependencies? - std::string propName = "LINK_INTERFACE_MULTIPLICITY"; - propName += suffix; - if(const char* config_reps = thisTarget->GetProperty(propName)) - { - sscanf(config_reps, "%u", &iface.Multiplicity); - } - else if(const char* reps = - thisTarget->GetProperty("LINK_INTERFACE_MULTIPLICITY")) - { - sscanf(reps, "%u", &iface.Multiplicity); - } - } -} - -//---------------------------------------------------------------------------- void cmTargetInternals::AddInterfaceEntries( cmTarget const* thisTarget, std::string const& config, std::string const& prop, std::vector<TargetPropertyEntry*>& entries) diff --git a/Source/cmTarget.h b/Source/cmTarget.h index c5918ba..84395e3 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -231,43 +231,6 @@ public: void GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const; - /** The link interface specifies transitive library dependencies and - other information needed by targets that link to this target. */ - struct LinkInterfaceLibraries - { - // Libraries listed in the interface. - std::vector<cmLinkItem> Libraries; - }; - struct LinkInterface: public LinkInterfaceLibraries - { - // Languages whose runtime libraries must be linked. - std::vector<std::string> Languages; - - // Shared library dependencies needed for linking on some platforms. - std::vector<cmLinkItem> SharedDeps; - - // Number of repetitions of a strongly connected component of two - // or more static libraries. - int Multiplicity; - - // Libraries listed for other configurations. - // Needed only for OLD behavior of CMP0003. - std::vector<cmLinkItem> WrongConfigLibraries; - - bool ImplementationIsInterface; - - LinkInterface(): Multiplicity(0), ImplementationIsInterface(false) {} - }; - - /** Get the link interface for the given configuration. Returns 0 - if the target cannot be linked. */ - LinkInterface const* GetLinkInterface(const std::string& config, - cmTarget const* headTarget) const; - LinkInterfaceLibraries const* - GetLinkInterfaceLibraries(const std::string& config, - cmTarget const* headTarget, - bool usage_requirements_only) const; - struct LinkImplementation: public cmLinkImplementationLibraries { // Languages whose runtime libraries must be linked. @@ -590,11 +553,6 @@ private: void ComputeImportInfo(std::string const& desired_config, ImportInfo& info) const; - - LinkInterface const* - GetImportLinkInterface(const std::string& config, cmTarget const* head, - bool usage_requirements_only) const; - cmLinkImplementationLibraries const* GetLinkImplementationLibrariesInternal(const std::string& config, cmTarget const* head) const; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=239c6d37e28e3a979122999e8555696865fb4824 commit 239c6d37e28e3a979122999e8555696865fb4824 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 21:00:31 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 00:55:21 2015 +0200 cmGlobalGenerator: Return null generator target for target. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 3c818ff..09c796b 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1617,6 +1617,11 @@ void cmGlobalGenerator::ClearGeneratorMembers() cmGeneratorTarget* cmGlobalGenerator::GetGeneratorTarget(cmTarget const* t) const { + if (!t) + { + return 0; + } + cmGeneratorTargetsType::const_iterator ti = this->GeneratorTargets.find(t); if(ti == this->GeneratorTargets.end()) { http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=10040601a2e13cbb0653a20c55c1c696b5cacf29 commit 10040601a2e13cbb0653a20c55c1c696b5cacf29 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 19:55:46 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 00:51:49 2015 +0200 cmLinkImplementationLibraries: Move to namespace scope. diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index a86c2bc..49f2515 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1120,7 +1120,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode } else if(!interfacePropertyName.empty()) { - if(cmTarget::LinkImplementationLibraries const* impl = + if(cmLinkImplementationLibraries const* impl = target->GetLinkImplementationLibraries(context->Config)) { linkedTargetsContent = diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index c831704..aed2c07 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1506,7 +1506,7 @@ cmGeneratorTarget::GetLinkImplementationClosure( tgts.Done = true; std::set<cmTarget const*> emitted; - cmTarget::LinkImplementationLibraries const* impl + cmLinkImplementationLibraries const* impl = this->Target->GetLinkImplementationLibraries(config); for(std::vector<cmLinkImplItem>::const_iterator diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h index da91ed1..a5427de 100644 --- a/Source/cmLinkItem.h +++ b/Source/cmLinkItem.h @@ -44,4 +44,16 @@ public: bool FromGenex; }; +/** The link implementation specifies the direct library + dependencies needed by the object files of the target. */ +struct cmLinkImplementationLibraries +{ + // Libraries linked directly in this configuration. + std::vector<cmLinkImplItem> Libraries; + + // Libraries linked directly in other configurations. + // Needed only for OLD behavior of CMP0003. + std::vector<cmLinkItem> WrongConfigLibraries; +}; + #endif diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1f8f07a..1d4313e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -3381,7 +3381,7 @@ bool cmTarget::HaveBuildTreeRPATH(const std::string& config) const { return false; } - if(LinkImplementationLibraries const* impl = + if(cmLinkImplementationLibraries const* impl = this->GetLinkImplementationLibraries(config)) { return !impl->Libraries.empty(); @@ -4331,7 +4331,7 @@ cmTargetInternals::ComputeLinkInterfaceLibraries( // to the link implementation. { // The link implementation is the default link interface. - cmTarget::LinkImplementationLibraries const* impl = + cmLinkImplementationLibraries const* impl = thisTarget->GetLinkImplementationLibrariesInternal(config, headTarget); iface.Libraries.insert(iface.Libraries.end(), impl->Libraries.begin(), impl->Libraries.end()); @@ -4431,7 +4431,7 @@ void cmTargetInternals::ComputeLinkInterface(cmTarget const* thisTarget, || thisTarget->GetPolicyStatusCMP0022() == cmPolicies::OLD) { // The link implementation is the default link interface. - cmTarget::LinkImplementationLibraries const* + cmLinkImplementationLibraries const* impl = thisTarget->GetLinkImplementationLibrariesInternal(config, headTarget); iface.ImplementationIsInterface = true; @@ -4482,7 +4482,7 @@ void cmTargetInternals::AddInterfaceEntries( cmTarget const* thisTarget, std::string const& config, std::string const& prop, std::vector<TargetPropertyEntry*>& entries) { - if(cmTarget::LinkImplementationLibraries const* impl = + if(cmLinkImplementationLibraries const* impl = thisTarget->GetLinkImplementationLibraries(config)) { for (std::vector<cmLinkImplItem>::const_iterator @@ -4532,14 +4532,14 @@ cmTarget::GetLinkImplementation(const std::string& config) const } //---------------------------------------------------------------------------- -cmTarget::LinkImplementationLibraries const* +cmLinkImplementationLibraries const* cmTarget::GetLinkImplementationLibraries(const std::string& config) const { return this->GetLinkImplementationLibrariesInternal(config, this); } //---------------------------------------------------------------------------- -cmTarget::LinkImplementationLibraries const* +cmLinkImplementationLibraries const* cmTarget::GetLinkImplementationLibrariesInternal(const std::string& config, cmTarget const* head) const { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index c4f3817..c5918ba 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -268,18 +268,7 @@ public: cmTarget const* headTarget, bool usage_requirements_only) const; - /** The link implementation specifies the direct library - dependencies needed by the object files of the target. */ - struct LinkImplementationLibraries - { - // Libraries linked directly in this configuration. - std::vector<cmLinkImplItem> Libraries; - - // Libraries linked directly in other configurations. - // Needed only for OLD behavior of CMP0003. - std::vector<cmLinkItem> WrongConfigLibraries; - }; - struct LinkImplementation: public LinkImplementationLibraries + struct LinkImplementation: public cmLinkImplementationLibraries { // Languages whose runtime libraries must be linked. std::vector<std::string> Languages; @@ -287,7 +276,7 @@ public: LinkImplementation const* GetLinkImplementation(const std::string& config) const; - LinkImplementationLibraries const* + cmLinkImplementationLibraries const* GetLinkImplementationLibraries(const std::string& config) const; cmTarget const* FindTargetToLink(std::string const& name) const; @@ -606,7 +595,7 @@ private: GetImportLinkInterface(const std::string& config, cmTarget const* head, bool usage_requirements_only) const; - LinkImplementationLibraries const* + cmLinkImplementationLibraries const* GetLinkImplementationLibrariesInternal(const std::string& config, cmTarget const* head) const; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9da6ee29fe0267ed347860f24f21be647ac81e8 commit d9da6ee29fe0267ed347860f24f21be647ac81e8 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Tue Aug 4 19:49:49 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 00:51:45 2015 +0200 cmLinkItem: Split to separate file. diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 92fee8a..428b364 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -288,6 +288,7 @@ set(SRCS cmInstallDirectoryGenerator.h cmInstallDirectoryGenerator.cxx cmLinkedTree.h + cmLinkItem.h cmListFileCache.cxx cmListFileCache.h cmListFileLexer.c diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h new file mode 100644 index 0000000..da91ed1 --- /dev/null +++ b/Source/cmLinkItem.h @@ -0,0 +1,47 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2004-2015 Kitware, Inc. + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ + +#ifndef cmLinkItem_h +#define cmLinkItem_h + +#include "cmListFileCache.h" + +class cmTarget; + +// Basic information about each link item. +class cmLinkItem: public std::string +{ + typedef std::string std_string; +public: + cmLinkItem(): std_string(), Target(0) {} + cmLinkItem(const std_string& n, + cmTarget const* t): std_string(n), Target(t) {} + cmLinkItem(cmLinkItem const& r): std_string(r), Target(r.Target) {} + cmTarget const* Target; +}; + +class cmLinkImplItem: public cmLinkItem +{ +public: + cmLinkImplItem(): cmLinkItem(), Backtrace(), FromGenex(false) {} + cmLinkImplItem(std::string const& n, + cmTarget const* t, + cmListFileBacktrace const& bt, + bool fromGenex): + cmLinkItem(n, t), Backtrace(bt), FromGenex(fromGenex) {} + cmLinkImplItem(cmLinkImplItem const& r): + cmLinkItem(r), Backtrace(r.Backtrace), FromGenex(r.FromGenex) {} + cmListFileBacktrace Backtrace; + bool FromGenex; +}; + +#endif diff --git a/Source/cmTarget.h b/Source/cmTarget.h index e3fbdfd..c4f3817 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -16,6 +16,7 @@ #include "cmPropertyMap.h" #include "cmPolicies.h" #include "cmListFileCache.h" +#include "cmLinkItem.h" #include <cmsys/auto_ptr.hxx> #if defined(CMAKE_BUILD_WITH_CMAKE) @@ -52,32 +53,6 @@ class cmTarget; class cmGeneratorTarget; class cmTargetTraceDependencies; -// Basic information about each link item. -class cmLinkItem: public std::string -{ - typedef std::string std_string; -public: - cmLinkItem(): std_string(), Target(0) {} - cmLinkItem(const std_string& n, - cmTarget const* t): std_string(n), Target(t) {} - cmLinkItem(cmLinkItem const& r): std_string(r), Target(r.Target) {} - cmTarget const* Target; -}; -class cmLinkImplItem: public cmLinkItem -{ -public: - cmLinkImplItem(): cmLinkItem(), Backtrace(), FromGenex(false) {} - cmLinkImplItem(std::string const& n, - cmTarget const* t, - cmListFileBacktrace const& bt, - bool fromGenex): - cmLinkItem(n, t), Backtrace(bt), FromGenex(fromGenex) {} - cmLinkImplItem(cmLinkImplItem const& r): - cmLinkItem(r), Backtrace(r.Backtrace), FromGenex(r.FromGenex) {} - cmListFileBacktrace Backtrace; - bool FromGenex; -}; - class cmTargetInternals; class cmTargetInternalPointer { http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27252b2414f5034b16a447273e1f249fdf317b72 commit 27252b2414f5034b16a447273e1f249fdf317b72 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 19:35:48 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 00:51:40 2015 +0200 cmComputeLinkInformation: Simplify generator object access. diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index c3f36af..c16472e 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -14,6 +14,7 @@ #include "cmComputeLinkDepends.h" #include "cmOrderDirectories.h" +#include "cmLocalGenerator.h" #include "cmGlobalGenerator.h" #include "cmState.h" #include "cmOutputConverter.h" @@ -248,7 +249,8 @@ cmComputeLinkInformation // Store context information. this->Target = target; this->Makefile = this->Target->Target->GetMakefile(); - this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); + this->GlobalGenerator = + this->Target->GetLocalGenerator()->GetGlobalGenerator(); this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance(); // Check whether to recognize OpenBSD-style library versioned names. @@ -540,9 +542,7 @@ bool cmComputeLinkInformation::Compute() i != wrongItems.end(); ++i) { cmTarget const* tgt = *i; - cmGeneratorTarget *gtgt = tgt->GetMakefile() - ->GetGlobalGenerator() - ->GetGeneratorTarget(tgt); + cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt); bool implib = (this->UseImportLibrary && (tgt->GetType() == cmTarget::SHARED_LIBRARY)); @@ -646,9 +646,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item, if(tgt && tgt->IsLinkable()) { - cmGeneratorTarget *gtgt = tgt->GetMakefile() - ->GetGlobalGenerator() - ->GetGeneratorTarget(tgt); + cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt); // This is a CMake target. Ask the target for its real name. if(impexe && this->LoaderFlag) { @@ -762,7 +760,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item, return; } - cmGeneratorTarget *gtgt = 0; + cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt); // Get a full path to the dependent shared library. // Add it to the runtime path computation so that the target being @@ -1812,9 +1810,7 @@ cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath, // Try to get the soname of the library. Only files with this name // could possibly conflict. - cmGeneratorTarget *gtgt = target->GetMakefile() - ->GetGlobalGenerator() - ->GetGeneratorTarget(target); + cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(target); std::string soName = gtgt->GetSOName(this->Config); const char* soname = soName.empty()? 0 : soName.c_str(); ----------------------------------------------------------------------- Summary of changes: Source/CMakeLists.txt | 1 + Source/cmComputeLinkDepends.cxx | 21 +- Source/cmComputeLinkDepends.h | 5 +- Source/cmComputeLinkInformation.cxx | 18 +- Source/cmComputeTargetDepends.cxx | 4 +- Source/cmExportFileGenerator.cxx | 7 +- Source/cmGeneratorExpressionNode.cxx | 6 +- Source/cmGeneratorTarget.cxx | 453 ++++++++++++++++- Source/cmGeneratorTarget.h | 81 +++ Source/cmGlobalGenerator.cxx | 6 + Source/cmGlobalVisualStudio8Generator.cxx | 1 + Source/cmGlobalVisualStudioGenerator.cxx | 1 + Source/cmGlobalXCodeGenerator.cxx | 2 + Source/cmLinkItem.h | 59 +++ Source/cmQtAutoGenerators.cxx | 13 +- Source/cmTarget.cxx | 778 ++++++----------------------- Source/cmTarget.h | 96 +--- 17 files changed, 802 insertions(+), 750 deletions(-) create mode 100644 Source/cmLinkItem.h hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits