Get the local generator from the GeneratorTarget.
The Makefile should not know the LocalGenerator at all
This commit is contained in:
parent
5aa556be56
commit
e77142350d
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue