diff options
author | Brad King <brad.king@kitware.com> | 2010-12-14 19:37:52 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-12-14 19:37:52 (GMT) |
commit | 75844666ac03a95c6546cafb54bce8827e1b664a (patch) | |
tree | 76d9170332e36be63f2ab848b3a7f499ed13adbc /Source | |
parent | d4b4db68e1af3bf41265a39fedab61ef80fbbad0 (diff) | |
parent | 8e82773eb4e2bb8d135479410393532021d3b85b (diff) | |
download | CMake-75844666ac03a95c6546cafb54bce8827e1b664a.zip CMake-75844666ac03a95c6546cafb54bce8827e1b664a.tar.gz CMake-75844666ac03a95c6546cafb54bce8827e1b664a.tar.bz2 |
Merge topic 'fix-INSTALL-and-PACKAGE-depend-tracing'
8e82773 Remove unused GLOBAL_TARGET generation code
0621362 Fix dependency tracing of INSTALL and PACKAGE (#11598)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 22 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 3 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 6 |
3 files changed, 9 insertions, 22 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 15abd02..ea091f9 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -814,24 +814,11 @@ void cmGlobalGenerator::Generate() // For each existing cmLocalGenerator unsigned int i; - // Consolidate global targets + // Put a copy of each global target in every directory. cmTargets globalTargets; this->CreateDefaultGlobalTargets(&globalTargets); for (i = 0; i < this->LocalGenerators.size(); ++i) { - cmTargets* targets = - &(this->LocalGenerators[i]->GetMakefile()->GetTargets()); - cmTargets::iterator tarIt; - for ( tarIt = targets->begin(); tarIt != targets->end(); ++ tarIt ) - { - if ( tarIt->second.GetType() == cmTarget::GLOBAL_TARGET ) - { - globalTargets[tarIt->first] = tarIt->second; - } - } - } - for (i = 0; i < this->LocalGenerators.size(); ++i) - { cmMakefile* mf = this->LocalGenerators[i]->GetMakefile(); cmTargets* targets = &(mf->GetTargets()); cmTargets::iterator tit; @@ -1881,8 +1868,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget( const char* name, const char* message, const cmCustomCommandLines* commandLines, std::vector<std::string> depends, - const char* workingDirectory, - bool depends_on_all /* = false */) + const char* workingDirectory) { // Package cmTarget target; @@ -1897,10 +1883,6 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget( workingDirectory); target.GetPostBuildCommands().push_back(cc); target.SetProperty("EchoString", message); - if ( depends_on_all ) - { - target.AddUtility("all"); - } std::vector<std::string>::iterator dit; for ( dit = depends.begin(); dit != depends.end(); ++ dit ) { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 7e43124..6a1aa53 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -291,8 +291,7 @@ protected: void CreateDefaultGlobalTargets(cmTargets* targets); cmTarget CreateGlobalTarget(const char* name, const char* message, const cmCustomCommandLines* commandLines, - std::vector<std::string> depends, const char* workingDir, - bool depends_on_all = false); + std::vector<std::string> depends, const char* workingDir); bool NeedSymbolicMark; bool UseLinkScript; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 56e0ed9..9983e5d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3590,6 +3590,12 @@ cmTarget* cmMakefile::FindTargetToUse(const char* name) return imported->second; } + // Look for a target built in this directory. + if(cmTarget* t = this->FindTarget(name)) + { + return t; + } + // Look for a target built in this project. return this->LocalGenerator->GetGlobalGenerator()->FindTarget(0, name); } |