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 a4634fb344e70d913df2d9dbeb41ec697648f4b0 (commit) via 6d8a125e4988d5cb269b3d1e29a6114ecd0c47a4 (commit) via 5f66900e71fdc33b40c46bf8a87b35d88d280769 (commit) via c5b8841fd96727a290e148e8b5132f893f8b4d4e (commit) via 8f75ea3b5e0b43118a6ecba4dc11a583d287705c (commit) via 56f0540b5183036b46babbfc9b9ec0979e54992f (commit) via 19b546ef766acedfcc9e19541c71b6a56d7fe630 (commit) via f8be9ba9c258698ed88a7510cf2ba3335491f3da (commit) via bc1097e3d9a2d9545db849f9eef657477d83509a (commit) via 204aecdf82aa583b213464411069de4c8d7af64b (commit) via 3dd6f0a5bc0b6457c82df0b980a8f6ac87d1a6f9 (commit) via 73e4df99cb4d63f5ea8babb40656a74305d77e12 (commit) via 193699376af09bd77875d4ddfd10c3feb13ecdd2 (commit) via 32f131b0ca68bc88bbb32dbf03e76dfba24defe5 (commit) from 6ec9f59bb05083853f5b25bd8af8733c1c53d650 (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=a4634fb344e70d913df2d9dbeb41ec697648f4b0 commit a4634fb344e70d913df2d9dbeb41ec697648f4b0 Merge: 6ec9f59 6d8a125 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Thu Aug 6 22:10:51 2015 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Aug 6 22:10:51 2015 -0400 Merge topic 'global-generator-makefiles' into next 6d8a125e cmQtAutoGenerators: Prefer a generator to access global generator. 5f66900e cmGlobalGenerator: Port Find API to cmMakefile. c5b8841f cmGlobalGenerator: Create global targets from cmMakefiles. 8f75ea3b cmGlobalGenerator: Port global target creation to cmMakefile. 56f0540b cmGlobalGenerator: Port Configure-time check to cmMakefile. 19b546ef cmGlobalGenerator: Base final target property computation on Makefiles. f8be9ba9 cmGlobalGenerator: Base progress on Makefiles, not LocalGenerators. bc1097e3 cmExportLibraryDependenciesCommand: Port to cmMakefile. 204aecdf cmGlobalGenerator: Port configure-time code to cmMakefile. 3dd6f0a5 cmake: Port configure-time code to cmMakefile. 73e4df99 cmGlobalGenerator: Store a container of cmMakefiles. 19369937 cmGeneratorTarget: Port internal type to cmGeneratorTarget. 32f131b0 cmGeneratorTarget: Prefer the local generator to access the global. http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d8a125e4988d5cb269b3d1e29a6114ecd0c47a4 commit 6d8a125e4988d5cb269b3d1e29a6114ecd0c47a4 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 20:39:24 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:29 2015 +0200 cmQtAutoGenerators: Prefer a generator to access global generator. diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index f1ba2f4..c619cdc 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -369,7 +369,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg, #if defined(_WIN32) && !defined(__CYGWIN__) bool usePRE_BUILD = false; - cmGlobalGenerator* gg = makefile->GetGlobalGenerator(); + cmGlobalGenerator* gg = lg->GetGlobalGenerator(); if(gg->GetName().find("Visual Studio") != std::string::npos) { cmGlobalVisualStudioGenerator* vsgg = @@ -396,7 +396,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg, std::vector<std::string> rcc_output; bool const isNinja = - makefile->GetGlobalGenerator()->GetName() == "Ninja"; + lg->GetGlobalGenerator()->GetName() == "Ninja"; if(isNinja #if defined(_WIN32) && !defined(__CYGWIN__) || usePRE_BUILD http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f66900e71fdc33b40c46bf8a87b35d88d280769 commit 5f66900e71fdc33b40c46bf8a87b35d88d280769 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 12:39:51 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:29 2015 +0200 cmGlobalGenerator: Port Find API to cmMakefile. diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx index c056d95..2558876 100644 --- a/Source/cmGetDirectoryPropertyCommand.cxx +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -51,10 +51,8 @@ bool cmGetDirectoryPropertyCommand sd = cmSystemTools::CollapseFullPath(sd); // lookup the makefile from the directory name - cmLocalGenerator *lg = - this->Makefile->GetGlobalGenerator()-> - FindLocalGenerator(sd); - if (!lg) + dir = this->Makefile->GetGlobalGenerator()->FindMakefile(sd); + if (!dir) { this->SetError ("DIRECTORY argument provided but requested directory not found. " @@ -62,7 +60,6 @@ bool cmGetDirectoryPropertyCommand "it is valid but has not been processed yet."); return false; } - dir = lg->GetMakefile(); ++i; } diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index 33d638b..4c42f53 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -262,13 +262,8 @@ bool cmGetPropertyCommand::HandleDirectoryMode() dir = cmSystemTools::CollapseFullPath(dir); // Lookup the generator. - if(cmLocalGenerator* lg = - (this->Makefile->GetGlobalGenerator()->FindLocalGenerator(dir))) - { - // Use the makefile for the directory found. - mf = lg->GetMakefile(); - } - else + mf = this->Makefile->GetGlobalGenerator()->FindMakefile(dir); + if (!mf) { // Could not find the directory. this->SetError diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 8645317..1e2d091 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2160,6 +2160,20 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap() } } +cmMakefile* +cmGlobalGenerator::FindMakefile(const std::string& start_dir) const +{ + for(std::vector<cmMakefile*>::const_iterator it = + this->Makefiles.begin(); it != this->Makefiles.end(); ++it) + { + std::string sd = (*it)->GetCurrentSourceDirectory(); + if (sd == start_dir) + { + return *it; + } + } + return 0; +} ///! Find a local generator by its startdirectory cmLocalGenerator* diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 616011f..778d946 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -256,6 +256,7 @@ public: that is a framework. */ bool NameResolvesToFramework(const std::string& libname) const; + cmMakefile* FindMakefile(const std::string& start_dir) const; ///! Find a local generator by its startdirectory cmLocalGenerator* FindLocalGenerator(const std::string& start_dir) const; diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx index 31e460f..17ad475 100644 --- a/Source/cmSetPropertyCommand.cxx +++ b/Source/cmSetPropertyCommand.cxx @@ -205,14 +205,8 @@ bool cmSetPropertyCommand::HandleDirectoryMode() // The local generators are associated with collapsed paths. dir = cmSystemTools::CollapseFullPath(dir); - // Lookup the generator. - if(cmLocalGenerator* lg = - this->Makefile->GetGlobalGenerator()->FindLocalGenerator(dir)) - { - // Use the makefile for the directory found. - mf = lg->GetMakefile(); - } - else + mf = this->Makefile->GetGlobalGenerator()->FindMakefile(dir); + if (!mf) { // Could not find the directory. this->SetError http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5b8841fd96727a290e148e8b5132f893f8b4d4e commit c5b8841fd96727a290e148e8b5132f893f8b4d4e Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 12:57:06 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:29 2015 +0200 cmGlobalGenerator: Create global targets from cmMakefiles. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index f96cf21..8645317 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1193,9 +1193,9 @@ void cmGlobalGenerator::Configure() cmTargets globalTargets; this->CreateDefaultGlobalTargets(&globalTargets); - for (i = 0; i < this->LocalGenerators.size(); ++i) + for (i = 0; i < this->Makefiles.size(); ++i) { - cmMakefile* mf = this->LocalGenerators[i]->GetMakefile(); + cmMakefile* mf = this->Makefiles[i]; cmTargets* targets = &(mf->GetTargets()); cmTargets::iterator tit; for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit ) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f75ea3b5e0b43118a6ecba4dc11a583d287705c commit 8f75ea3b5e0b43118a6ecba4dc11a583d287705c Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 12:48:08 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:29 2015 +0200 cmGlobalGenerator: Port global target creation to cmMakefile. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 98961d8..f96cf21 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2247,7 +2247,7 @@ inline std::string removeQuotes(const std::string& s) void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) { - cmMakefile* mf = this->LocalGenerators[0]->GetMakefile(); + cmMakefile* mf = this->Makefiles[0]; const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir(); // CPack http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56f0540b5183036b46babbfc9b9ec0979e54992f commit 56f0540b5183036b46babbfc9b9ec0979e54992f Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 12:45:17 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:29 2015 +0200 cmGlobalGenerator: Port Configure-time check to cmMakefile. This uses no generate-time state. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 83bfe57..98961d8 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1641,11 +1641,11 @@ void cmGlobalGenerator::CheckLocalGenerators() // std::set<std::string> notFoundMap; // after it is all done do a ConfigureFinalPass cmState* state = this->GetCMakeInstance()->GetState(); - for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) + for (unsigned int i = 0; i < this->Makefiles.size(); ++i) { - this->LocalGenerators[i]->GetMakefile()->ConfigureFinalPass(); + this->Makefiles[i]->ConfigureFinalPass(); cmTargets &targets = - this->LocalGenerators[i]->GetMakefile()->GetTargets(); + this->Makefiles[i]->GetTargets(); for (cmTargets::iterator l = targets.begin(); l != targets.end(); l++) { @@ -1700,15 +1700,14 @@ void cmGlobalGenerator::CheckLocalGenerators() } std::string text = notFoundMap[varName]; text += "\n used as include directory in directory "; - text += this->LocalGenerators[i] - ->GetMakefile()->GetCurrentSourceDirectory(); + text += this->Makefiles[i]->GetCurrentSourceDirectory(); notFoundMap[varName] = text; } } } this->CMakeInstance->UpdateProgress ("Configuring", 0.9f+0.1f*(static_cast<float>(i)+1.0f)/ - static_cast<float>(this->LocalGenerators.size())); + static_cast<float>(this->Makefiles.size())); } if(!notFoundMap.empty()) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19b546ef766acedfcc9e19541c71b6a56d7fe630 commit 19b546ef766acedfcc9e19541c71b6a56d7fe630 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 12:17:31 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:29 2015 +0200 cmGlobalGenerator: Base final target property computation on Makefiles. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 5787a9d..83bfe57 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1482,9 +1482,9 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) void cmGlobalGenerator::FinalizeTargetCompileInfo() { // Construct per-target generator information. - for(unsigned int i=0; i < this->LocalGenerators.size(); ++i) + for(unsigned int i=0; i < this->Makefiles.size(); ++i) { - cmMakefile *mf = this->LocalGenerators[i]->GetMakefile(); + cmMakefile *mf = this->Makefiles[i]; const cmStringRange noconfig_compile_definitions = mf->GetCompileDefinitionsEntries(); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f8be9ba9c258698ed88a7510cf2ba3335491f3da commit f8be9ba9c258698ed88a7510cf2ba3335491f3da Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 12:13:41 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:28 2015 +0200 cmGlobalGenerator: Base progress on Makefiles, not LocalGenerators. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 5266b23..5787a9d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1148,9 +1148,9 @@ void cmGlobalGenerator::Configure() // update the cache entry for the number of local generators, this is used // for progress char num[100]; - sprintf(num,"%d",static_cast<int>(this->LocalGenerators.size())); + sprintf(num,"%d",static_cast<int>(this->Makefiles.size())); this->GetCMakeInstance()->AddCacheEntry - ("CMAKE_NUMBER_OF_LOCAL_GENERATORS", num, + ("CMAKE_NUMBER_OF_MAKEFILES", num, "number of local generators", cmState::INTERNAL); // check for link libraries and include directories containing "NOTFOUND" @@ -1742,9 +1742,9 @@ int cmGlobalGenerator::TryCompile(const std::string& srcdir, // take the bulk of the time, so try and guess some progress // by getting closer and closer to 100 without actually getting there. if (!this->CMakeInstance->GetState()->GetInitializedCacheValue - ("CMAKE_NUMBER_OF_LOCAL_GENERATORS")) + ("CMAKE_NUMBER_OF_MAKEFILES")) { - // If CMAKE_NUMBER_OF_LOCAL_GENERATORS is not set + // If CMAKE_NUMBER_OF_MAKEFILES is not set // we are in the first time progress and we have no // idea how long it will be. So, just move 1/10th of the way // there each time, and don't go over 95% @@ -1935,22 +1935,16 @@ std::string cmGlobalGenerator::GenerateCMakeBuildCommand( void cmGlobalGenerator::AddMakefile(cmMakefile *mf) { this->Makefiles.push_back(mf); -} - -//---------------------------------------------------------------------------- -void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg) -{ - this->LocalGenerators.push_back(lg); // update progress // estimate how many lg there will be const char *numGenC = this->CMakeInstance->GetState()->GetInitializedCacheValue - ("CMAKE_NUMBER_OF_LOCAL_GENERATORS"); + ("CMAKE_NUMBER_OF_MAKEFILES"); if (!numGenC) { - // If CMAKE_NUMBER_OF_LOCAL_GENERATORS is not set + // If CMAKE_NUMBER_OF_MAKEFILES is not set // we are in the first time progress and we have no // idea how long it will be. So, just move half way // there each time, and don't go over 95% @@ -1965,7 +1959,7 @@ void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg) } int numGen = atoi(numGenC); - float prog = 0.9f*static_cast<float>(this->LocalGenerators.size())/ + float prog = 0.9f*static_cast<float>(this->Makefiles.size())/ static_cast<float>(numGen); if (prog > 0.9f) { @@ -1974,6 +1968,12 @@ void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg) this->CMakeInstance->UpdateProgress("Configuring", prog); } +//---------------------------------------------------------------------------- +void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg) +{ + this->LocalGenerators.push_back(lg); +} + void cmGlobalGenerator::AddInstallComponent(const char* component) { if(component && *component) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc1097e3d9a2d9545db849f9eef657477d83509a commit bc1097e3d9a2d9545db849f9eef657477d83509a Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 13:18:30 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:28 2015 +0200 cmExportLibraryDependenciesCommand: Port to cmMakefile. diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index cb150a7..fde8fb1 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -11,7 +11,6 @@ ============================================================================*/ #include "cmExportLibraryDependenciesCommand.h" #include "cmGlobalGenerator.h" -#include "cmLocalGenerator.h" #include "cmGeneratedFileStream.h" #include "cmake.h" #include "cmVersion.h" @@ -82,15 +81,14 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const // the project. cmake* cm = this->Makefile->GetCMakeInstance(); cmGlobalGenerator* global = cm->GetGlobalGenerator(); - const std::vector<cmLocalGenerator *>& locals = global->GetLocalGenerators(); + const std::vector<cmMakefile*>& locals = global->GetMakefiles(); std::map<std::string, std::string> libDepsOld; std::map<std::string, std::string> libDepsNew; std::map<std::string, std::string> libTypes; - for(std::vector<cmLocalGenerator *>::const_iterator i = locals.begin(); + for(std::vector<cmMakefile*>::const_iterator i = locals.begin(); i != locals.end(); ++i) { - const cmLocalGenerator* gen = *i; - const cmTargets &tgts = gen->GetMakefile()->GetTargets(); + const cmTargets &tgts = (*i)->GetTargets(); for(cmTargets::const_iterator l = tgts.begin(); l != tgts.end(); ++l) { http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=204aecdf82aa583b213464411069de4c8d7af64b commit 204aecdf82aa583b213464411069de4c8d7af64b Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 20:26:32 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:28 2015 +0200 cmGlobalGenerator: Port configure-time code to cmMakefile. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 749ab6e..5266b23 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2821,9 +2821,9 @@ cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs, } // Shorten the output name (in expected use case). - cmLocalGenerator* lg = this->GetLocalGenerators()[0]; - std::string fname = lg->Convert(outputs[0], - cmLocalGenerator::HOME_OUTPUT); + cmOutputConverter converter(this->GetMakefiles()[0]->GetStateSnapshot()); + std::string fname = converter.Convert( + outputs[0], cmLocalGenerator::HOME_OUTPUT); // Associate the hash with this output. this->RuleHashes[fname] = hash; http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3dd6f0a5bc0b6457c82df0b980a8f6ac87d1a6f9 commit 3dd6f0a5bc0b6457c82df0b980a8f6ac87d1a6f9 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 13:15:47 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:28 2015 +0200 cmake: Port configure-time code to cmMakefile. diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 8c455b2..d1e6265 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1592,7 +1592,7 @@ int cmake::ActualConfigure() } } - cmMakefile* mf=this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile(); + cmMakefile* mf=this->GlobalGenerator->GetMakefiles()[0]; if (mf->IsOn("CTEST_USE_LAUNCHERS") && !this->State->GetGlobalProperty("RULE_LAUNCH_COMPILE")) { http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=73e4df99cb4d63f5ea8babb40656a74305d77e12 commit 73e4df99cb4d63f5ea8babb40656a74305d77e12 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 20:21:22 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:28 2015 +0200 cmGlobalGenerator: Store a container of cmMakefiles. For use at configure-time. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 3c818ff..749ab6e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1129,6 +1129,7 @@ void cmGlobalGenerator::Configure() // start with this directory cmLocalGenerator *lg = this->MakeLocalGenerator(); + this->Makefiles.push_back(lg->GetMakefile()); this->LocalGenerators.push_back(lg); // set the Start directories @@ -1599,6 +1600,8 @@ void cmGlobalGenerator::ClearGeneratorMembers() cmDeleteAll(this->BuildExportSets); this->BuildExportSets.clear(); + this->Makefiles.clear(); + cmDeleteAll(this->LocalGenerators); this->LocalGenerators.clear(); @@ -1929,6 +1932,12 @@ std::string cmGlobalGenerator::GenerateCMakeBuildCommand( } //---------------------------------------------------------------------------- +void cmGlobalGenerator::AddMakefile(cmMakefile *mf) +{ + this->Makefiles.push_back(mf); +} + +//---------------------------------------------------------------------------- void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg) { this->LocalGenerators.push_back(lg); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 3402fbc..616011f 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -173,6 +173,8 @@ public: cmake *GetCMakeInstance() const { return this->CMakeInstance; } void SetConfiguredFilesPath(cmGlobalGenerator* gen); + const std::vector<cmMakefile*>& GetMakefiles() const { + return this->Makefiles;} const std::vector<cmLocalGenerator *>& GetLocalGenerators() const { return this->LocalGenerators;} @@ -184,6 +186,7 @@ public: void SetCurrentMakefile(cmMakefile* mf) {this->CurrentMakefile = mf;} + void AddMakefile(cmMakefile *mf); void AddLocalGenerator(cmLocalGenerator *lg); ///! Set an generator for an "external makefile based project" @@ -402,6 +405,7 @@ protected: std::string FindMakeProgramFile; std::string ConfiguredFilesPath; cmake *CMakeInstance; + std::vector<cmMakefile*> Makefiles; std::vector<cmLocalGenerator *> LocalGenerators; cmMakefile* CurrentMakefile; // map from project name to vector of local generators in that project diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 60a11e1..85bc493 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1857,6 +1857,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, // create a new local generator and set its parent cmLocalGenerator *lg2 = this->GetGlobalGenerator() ->MakeLocalGenerator(newSnapshot, this->LocalGenerator); + this->GetGlobalGenerator()->AddMakefile(lg2->GetMakefile()); this->GetGlobalGenerator()->AddLocalGenerator(lg2); cmMakefile* subMf = lg2->GetMakefile(); http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=193699376af09bd77875d4ddfd10c3feb13ecdd2 commit 193699376af09bd77875d4ddfd10c3feb13ecdd2 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 19:44:31 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:28 2015 +0200 cmGeneratorTarget: Port internal type to cmGeneratorTarget. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index b19856d..e914cf6 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -36,7 +36,7 @@ //---------------------------------------------------------------------------- void reportBadObjLib(std::vector<cmSourceFile*> const& badObjLib, - cmTarget *target, cmake *cm) + cmGeneratorTarget const* target, cmake *cm) { if(!badObjLib.empty()) { @@ -50,7 +50,7 @@ void reportBadObjLib(std::vector<cmSourceFile*> const& badObjLib, e << "but may contain only sources that compile, header files, and " "other files that would not affect linking of a normal library."; cm->IssueMessage(cmake::FATAL_ERROR, e.str(), - target->GetBacktrace()); + target->Target->GetBacktrace()); } } @@ -133,14 +133,14 @@ struct TagVisitor { DataType& Data; std::vector<cmSourceFile*> BadObjLibFiles; - cmTarget *Target; + cmGeneratorTarget const* Target; cmGlobalGenerator *GlobalGenerator; cmsys::RegularExpression Header; bool IsObjLib; - TagVisitor(cmTarget *target, DataType& data) + TagVisitor(cmGeneratorTarget const* target, DataType& data) : Data(data), Target(target), - GlobalGenerator(target->GetMakefile()->GetGlobalGenerator()), + GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator()), Header(CM_HEADER_REGEX), IsObjLib(target->GetType() == cmTarget::OBJECT_LIBRARY) { @@ -362,7 +362,7 @@ static void handleSystemIncludesDep(cmMakefile *mf, cmTarget const* depTgt, { \ std::vector<cmSourceFile*> sourceFiles; \ this->Target->GetSourceFiles(sourceFiles, config); \ - TagVisitor<DATA ## Tag DATATYPE> visitor(this->Target, data); \ + TagVisitor<DATA ## Tag DATATYPE> visitor(this, data); \ for(std::vector<cmSourceFile*>::const_iterator si = sourceFiles.begin(); \ si != sourceFiles.end(); ++si) \ { \ http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32f131b0ca68bc88bbb32dbf03e76dfba24defe5 commit 32f131b0ca68bc88bbb32dbf03e76dfba24defe5 Author: Stephen Kelly <steve...@gmail.com> AuthorDate: Sun Aug 2 19:42:31 2015 +0200 Commit: Stephen Kelly <steve...@gmail.com> CommitDate: Fri Aug 7 04:10:28 2015 +0200 cmGeneratorTarget: Prefer the local generator to access the global. diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index c831704..b19856d 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -234,7 +234,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg) { this->Makefile = this->Target->GetMakefile(); this->LocalGenerator = lg; - this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); + this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator(); } cmGeneratorTarget::~cmGeneratorTarget() @@ -1556,7 +1556,7 @@ cmTargetTraceDependencies { // Convenience. this->Makefile = this->Target->GetMakefile(); - this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); + this->GlobalGenerator = target->GetLocalGenerator()->GetGlobalGenerator(); this->CurrentEntry = 0; // Queue all the source files already specified for the target. @@ -1944,8 +1944,7 @@ void cmGeneratorTarget::GenerateTargetManifest( { return; } - cmMakefile* mf = this->Target->GetMakefile(); - cmGlobalGenerator* gg = mf->GetGlobalGenerator(); + cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator(); // Get the names. std::string name; ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits