diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-06-06 12:59:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-06-22 17:23:46 (GMT) |
commit | e77142350de1dec03ca788e3d3e278b7b9358fb5 (patch) | |
tree | d3e50ef3ef2352753a429010f0a09d2227fe7393 | |
parent | 5aa556be560b782d149b53bccc12dfc2be2bda0b (diff) | |
download | CMake-e77142350de1dec03ca788e3d3e278b7b9358fb5.zip CMake-e77142350de1dec03ca788e3d3e278b7b9358fb5.tar.gz CMake-e77142350de1dec03ca788e3d3e278b7b9358fb5.tar.bz2 |
Get the local generator from the GeneratorTarget.
The Makefile should not know the LocalGenerator at all
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmOSXBundleGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 6 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index fa471c9..09fad5c 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1173,8 +1173,10 @@ void cmMakefileTargetGenerator::WriteTargetDependRules() && linkee->GetType() != cmTarget::INTERFACE_LIBRARY && emitted.insert(linkee).second) { + cmGeneratorTarget* gt = + this->GlobalGenerator->GetGeneratorTarget(linkee); + cmLocalGenerator* lg = gt->GetLocalGenerator(); cmMakefile* mf = linkee->GetMakefile(); - cmLocalGenerator* lg = mf->GetLocalGenerator(); std::string di = mf->GetCurrentBinaryDirectory(); di += "/"; di += lg->GetTargetDirectory(*linkee); diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index a8eef82..3bc0eb7 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -22,7 +22,7 @@ cmOSXBundleGenerator(cmGeneratorTarget* target, const std::string& configName) : GT(target) , Makefile(target->Target->GetMakefile()) - , LocalGenerator(Makefile->GetLocalGenerator()) + , LocalGenerator(target->GetLocalGenerator()) , ConfigName(configName) , MacContentFolders(0) { diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 53fea83..b03e45a 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -521,10 +521,10 @@ static void GetCompileDefinitionsAndDirectories(cmTarget const* target, std::string &defs) { cmMakefile* makefile = target->GetMakefile(); - cmLocalGenerator* localGen = makefile->GetLocalGenerator(); + cmGlobalGenerator* globalGen = makefile->GetGlobalGenerator(); std::vector<std::string> includeDirs; - cmGeneratorTarget *gtgt = localGen->GetGlobalGenerator() - ->GetGeneratorTarget(target); + cmGeneratorTarget *gtgt = globalGen->GetGeneratorTarget(target); + cmLocalGenerator *localGen = gtgt->GetLocalGenerator(); // Get the include dirs for this target, without stripping the implicit // include dirs off, see http://public.kitware.com/Bug/view.php?id=13667 localGen->GetIncludeDirectories(includeDirs, gtgt, "CXX", config, false); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 9b78df3..12a1e42 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -176,7 +176,7 @@ cmVisualStudio10TargetGenerator(cmTarget* target, this->Makefile->GetConfigurations(this->Configurations); this->LocalGenerator = (cmLocalVisualStudio7Generator*) - this->Makefile->GetLocalGenerator(); + this->GeneratorTarget->GetLocalGenerator(); this->Name = this->Target->GetName(); this->GUID = this->GlobalGenerator->GetGUID(this->Name.c_str()); this->Platform = gg->GetPlatformName(); |