Merge topic 'use-generator-target'

e7714235 Get the local generator from the GeneratorTarget.
5aa556be cmMakefileTargetGenerator: Require cmGeneratorTarget.
bb88668a cmNinjaGenerator: Require cmGeneratorTarget.
a3b210fd cmGeneratorTarget: Require a cmLocalGenerator to construct.
8ec60c67 cmGlobalGenerator: Create GeneratorTargets with a local generator.
dee197fe GHS: Use a cmGeneratorTarget in generator API.
b2b41b83 cmGeneratorTarget: Add accessor for cmLocalGenerator.
2e9333a1 C::B: Get the Makefile from the LocalGenerator, not vice-versa.
This commit is contained in:
Brad King 2015-06-23 09:08:20 -04:00 committed by CMake Topic Stage
commit 56e5d4e180
22 changed files with 70 additions and 57 deletions

View File

@ -313,7 +313,7 @@ void cmExtraCodeBlocksGenerator
" "<<virtualFolders<<"\n" " "<<virtualFolders<<"\n"
" <Build>\n"; " <Build>\n";
this->AppendTarget(fout, "all", 0, make.c_str(), mf, compiler.c_str()); this->AppendTarget(fout, "all", 0, make.c_str(), lgs[0], compiler.c_str());
// add all executable and library targets and some of the GLOBAL // add all executable and library targets and some of the GLOBAL
// and UTILITY targets // and UTILITY targets
@ -335,7 +335,7 @@ void cmExtraCodeBlocksGenerator
makefile->GetHomeOutputDirectory())==0) makefile->GetHomeOutputDirectory())==0)
{ {
this->AppendTarget(fout, ti->first, 0, this->AppendTarget(fout, ti->first, 0,
make.c_str(), makefile, compiler.c_str()); make.c_str(), *lg, compiler.c_str());
} }
} }
break; break;
@ -351,7 +351,7 @@ void cmExtraCodeBlocksGenerator
} }
this->AppendTarget(fout, ti->first, 0, this->AppendTarget(fout, ti->first, 0,
make.c_str(), makefile, compiler.c_str()); make.c_str(), *lg, compiler.c_str());
break; break;
case cmTarget::EXECUTABLE: case cmTarget::EXECUTABLE:
case cmTarget::STATIC_LIBRARY: case cmTarget::STATIC_LIBRARY:
@ -360,11 +360,11 @@ void cmExtraCodeBlocksGenerator
case cmTarget::OBJECT_LIBRARY: case cmTarget::OBJECT_LIBRARY:
{ {
this->AppendTarget(fout, ti->first, &ti->second, this->AppendTarget(fout, ti->first, &ti->second,
make.c_str(), makefile, compiler.c_str()); make.c_str(), *lg, compiler.c_str());
std::string fastTarget = ti->first; std::string fastTarget = ti->first;
fastTarget += "/fast"; fastTarget += "/fast";
this->AppendTarget(fout, fastTarget, &ti->second, this->AppendTarget(fout, fastTarget, &ti->second,
make.c_str(), makefile, compiler.c_str()); make.c_str(), *lg, compiler.c_str());
} }
break; break;
default: default:
@ -519,14 +519,16 @@ void cmExtraCodeBlocksGenerator
// Write a dummy file for OBJECT libraries, so C::B can reference some file // Write a dummy file for OBJECT libraries, so C::B can reference some file
std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile( std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile(
cmMakefile* mf, cmTarget* target) const cmLocalGenerator* lg,
cmTarget* target) const
{ {
cmMakefile *mf = lg->GetMakefile();
// this file doesn't seem to be used by C::B in custom makefile mode, // this file doesn't seem to be used by C::B in custom makefile mode,
// but we generate a unique file for each OBJECT library so in case // but we generate a unique file for each OBJECT library so in case
// C::B uses it in some way, the targets don't interfere with each other. // C::B uses it in some way, the targets don't interfere with each other.
std::string filename = mf->GetCurrentBinaryDirectory(); std::string filename = mf->GetCurrentBinaryDirectory();
filename += "/"; filename += "/";
filename += mf->GetLocalGenerator()->GetTargetDirectory(*target); filename += lg->GetTargetDirectory(*target);
filename += "/"; filename += "/";
filename += target->GetName(); filename += target->GetName();
filename += ".objlib"; filename += ".objlib";
@ -547,9 +549,10 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
const std::string& targetName, const std::string& targetName,
cmTarget* target, cmTarget* target,
const char* make, const char* make,
const cmMakefile* makefile, const cmLocalGenerator* lg,
const char* compiler) const char* compiler)
{ {
cmMakefile const* makefile = lg->GetMakefile();
std::string makefileName = makefile->GetCurrentBinaryDirectory(); std::string makefileName = makefile->GetCurrentBinaryDirectory();
makefileName += "/Makefile"; makefileName += "/Makefile";
@ -583,7 +586,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
std::string location; std::string location;
if ( target->GetType()==cmTarget::OBJECT_LIBRARY) if ( target->GetType()==cmTarget::OBJECT_LIBRARY)
{ {
location = this->CreateDummyTargetFile(const_cast<cmMakefile*>(makefile), location = this->CreateDummyTargetFile(const_cast<cmLocalGenerator*>(lg),
target); target);
} }
else else
@ -618,8 +621,7 @@ void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout,
std::set<std::string> uniqIncludeDirs; std::set<std::string> uniqIncludeDirs;
std::vector<std::string> includes; std::vector<std::string> includes;
target->GetMakefile()->GetLocalGenerator()-> lg->GetIncludeDirectories(includes, gtgt, "C", buildType);
GetIncludeDirectories(includes, gtgt, "C", buildType);
uniqIncludeDirs.insert(includes.begin(), includes.end()); uniqIncludeDirs.insert(includes.begin(), includes.end());

View File

@ -48,7 +48,8 @@ private:
void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs, void CreateNewProjectFile(const std::vector<cmLocalGenerator*>& lgs,
const std::string& filename); const std::string& filename);
std::string CreateDummyTargetFile(cmMakefile* mf, cmTarget* target) const; std::string CreateDummyTargetFile(cmLocalGenerator* lg,
cmTarget* target) const;
std::string GetCBCompilerId(const cmMakefile* mf); std::string GetCBCompilerId(const cmMakefile* mf);
int GetCBTargetType(cmTarget* target); int GetCBTargetType(cmTarget* target);
@ -58,7 +59,7 @@ private:
const std::string& targetName, const std::string& targetName,
cmTarget* target, cmTarget* target,
const char* make, const char* make,
const cmMakefile* makefile, const cmLocalGenerator* lg,
const char* compiler); const char* compiler);
}; };

View File

@ -220,14 +220,20 @@ struct TagVisitor
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t), cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
: Target(t),
SourceFileFlagsConstructed(false) SourceFileFlagsConstructed(false)
{ {
this->Makefile = this->Target->GetMakefile(); this->Makefile = this->Target->GetMakefile();
this->LocalGenerator = this->Makefile->GetLocalGenerator(); this->LocalGenerator = lg;
this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
} }
cmLocalGenerator* cmGeneratorTarget::GetLocalGenerator() const
{
return this->LocalGenerator;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int cmGeneratorTarget::GetType() const int cmGeneratorTarget::GetType() const
{ {

View File

@ -24,7 +24,9 @@ class cmTarget;
class cmGeneratorTarget class cmGeneratorTarget
{ {
public: public:
cmGeneratorTarget(cmTarget*); cmGeneratorTarget(cmTarget*, cmLocalGenerator* lg);
cmLocalGenerator* GetLocalGenerator() const;
int GetType() const; int GetType() const;
std::string GetName() const; std::string GetName() const;

View File

@ -21,23 +21,24 @@
std::string const cmGhsMultiTargetGenerator::DDOption("-dynamic"); std::string const cmGhsMultiTargetGenerator::DDOption("-dynamic");
cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmTarget *target) cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget *target)
: Target(target) : Target(target->Target)
, GeneratorTarget(target)
, LocalGenerator(static_cast<cmLocalGhsMultiGenerator *>( , LocalGenerator(static_cast<cmLocalGhsMultiGenerator *>(
target->GetMakefile()->GetLocalGenerator())) target->GetLocalGenerator()))
, Makefile(target->GetMakefile()) , Makefile(target->Target->GetMakefile())
, TargetGroup(DetermineIfTargetGroup(target)) , TargetGroup(DetermineIfTargetGroup(target->Target))
, DynamicDownload(false) , DynamicDownload(false)
{ {
this->RelBuildFilePath = this->GetRelBuildFilePath(target); this->RelBuildFilePath = this->GetRelBuildFilePath(target->Target);
this->RelOutputFileName = this->RelOutputFileName =
this->RelBuildFilePath + this->Target->GetName() + ".a"; this->RelBuildFilePath + this->Target->GetName() + ".a";
this->RelBuildFileName = this->RelBuildFilePath; this->RelBuildFileName = this->RelBuildFilePath;
this->RelBuildFileName += this->GetBuildFileName(target); this->RelBuildFileName += this->GetBuildFileName(target->Target);
std::string absPathToRoot = this->GetAbsPathToRoot(target); std::string absPathToRoot = this->GetAbsPathToRoot(target->Target);
absPathToRoot = this->AddSlashIfNeededToPath(absPathToRoot); absPathToRoot = this->AddSlashIfNeededToPath(absPathToRoot);
this->AbsBuildFilePath = absPathToRoot + this->RelBuildFilePath; this->AbsBuildFilePath = absPathToRoot + this->RelBuildFilePath;
this->AbsBuildFileName = absPathToRoot + this->RelBuildFileName; this->AbsBuildFileName = absPathToRoot + this->RelBuildFileName;
@ -373,7 +374,6 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries()
cmTarget *tg(GetGlobalGenerator()->FindTarget(libName)); cmTarget *tg(GetGlobalGenerator()->FindTarget(libName));
if (NULL != tg) if (NULL != tg)
{ {
cmGhsMultiTargetGenerator gmtg(tg);
libName = tg->GetName() + ".a"; libName = tg->GetName() + ".a";
} }
*this->GetFolderBuildStreams() << " -l\"" << libName << "\"" *this->GetFolderBuildStreams() << " -l\"" << libName << "\""

View File

@ -27,7 +27,7 @@ class cmCustomCommand;
class cmGhsMultiTargetGenerator class cmGhsMultiTargetGenerator
{ {
public: public:
cmGhsMultiTargetGenerator(cmTarget *target); cmGhsMultiTargetGenerator(cmGeneratorTarget* target);
virtual ~cmGhsMultiTargetGenerator(); virtual ~cmGhsMultiTargetGenerator();
@ -100,6 +100,7 @@ private:
const std::string &language); const std::string &language);
cmTarget *Target; cmTarget *Target;
cmGeneratorTarget* GeneratorTarget;
cmLocalGhsMultiGenerator *LocalGenerator; cmLocalGhsMultiGenerator *LocalGenerator;
cmMakefile *Makefile; cmMakefile *Makefile;
std::string AbsBuildFilePath; std::string AbsBuildFilePath;

View File

@ -1456,15 +1456,16 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo()
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmGlobalGenerator::CreateGeneratorTargets(cmMakefile *mf) void cmGlobalGenerator::CreateGeneratorTargets(cmLocalGenerator *lg)
{ {
cmGeneratorTargetsType generatorTargets; cmGeneratorTargetsType generatorTargets;
cmMakefile* mf = lg->GetMakefile();
cmTargets& targets = mf->GetTargets(); cmTargets& targets = mf->GetTargets();
for(cmTargets::iterator ti = targets.begin(); for(cmTargets::iterator ti = targets.begin();
ti != targets.end(); ++ti) ti != targets.end(); ++ti)
{ {
cmTarget* t = &ti->second; cmTarget* t = &ti->second;
cmGeneratorTarget* gt = new cmGeneratorTarget(t); cmGeneratorTarget* gt = new cmGeneratorTarget(t, lg);
this->ComputeTargetObjectDirectory(gt); this->ComputeTargetObjectDirectory(gt);
this->GeneratorTargets[t] = gt; this->GeneratorTargets[t] = gt;
generatorTargets[t] = gt; generatorTargets[t] = gt;
@ -1474,7 +1475,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(cmMakefile *mf)
j = mf->GetOwnedImportedTargets().begin(); j = mf->GetOwnedImportedTargets().begin();
j != mf->GetOwnedImportedTargets().end(); ++j) j != mf->GetOwnedImportedTargets().end(); ++j)
{ {
cmGeneratorTarget* gt = new cmGeneratorTarget(*j); cmGeneratorTarget* gt = new cmGeneratorTarget(*j, lg);
this->GeneratorTargets[*j] = gt; this->GeneratorTargets[*j] = gt;
generatorTargets[*j] = gt; generatorTargets[*j] = gt;
} }
@ -1487,7 +1488,7 @@ void cmGlobalGenerator::CreateGeneratorTargets()
// Construct per-target generator information. // Construct per-target generator information.
for(unsigned int i=0; i < this->LocalGenerators.size(); ++i) for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
{ {
this->CreateGeneratorTargets(this->LocalGenerators[i]->GetMakefile()); this->CreateGeneratorTargets(this->LocalGenerators[i]);
} }
} }

View File

@ -483,7 +483,7 @@ private:
// Per-target generator information. // Per-target generator information.
cmGeneratorTargetsType GeneratorTargets; cmGeneratorTargetsType GeneratorTargets;
friend class cmake; friend class cmake;
void CreateGeneratorTargets(cmMakefile* mf); void CreateGeneratorTargets(cmLocalGenerator* lg);
void CreateGeneratorTargets(); void CreateGeneratorTargets();
void ClearGeneratorMembers(); void ClearGeneratorMembers();

View File

@ -37,7 +37,7 @@ void cmLocalGhsMultiGenerator::Generate()
{ {
continue; continue;
} }
cmGhsMultiTargetGenerator tg(l->second->Target); cmGhsMultiTargetGenerator tg(l->second);
tg.Generate(); tg.Generate();
} }
} }

View File

@ -22,7 +22,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmMakefileExecutableTargetGenerator cmMakefileExecutableTargetGenerator
::cmMakefileExecutableTargetGenerator(cmGeneratorTarget* target): ::cmMakefileExecutableTargetGenerator(cmGeneratorTarget* target):
cmMakefileTargetGenerator(target->Target) cmMakefileTargetGenerator(target)
{ {
this->CustomCommandDriver = OnDepends; this->CustomCommandDriver = OnDepends;
this->Target->GetExecutableNames( this->Target->GetExecutableNames(

View File

@ -22,7 +22,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmMakefileLibraryTargetGenerator cmMakefileLibraryTargetGenerator
::cmMakefileLibraryTargetGenerator(cmGeneratorTarget* target): ::cmMakefileLibraryTargetGenerator(cmGeneratorTarget* target):
cmMakefileTargetGenerator(target->Target) cmMakefileTargetGenerator(target)
{ {
this->CustomCommandDriver = OnDepends; this->CustomCommandDriver = OnDepends;
if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY) if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)

View File

@ -32,7 +32,7 @@
#include <ctype.h> #include <ctype.h>
cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target) cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmGeneratorTarget* target)
: OSXBundleGenerator(0) : OSXBundleGenerator(0)
, MacOSXContentGenerator(0) , MacOSXContentGenerator(0)
{ {
@ -41,16 +41,15 @@ cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target)
this->FlagFileStream = 0; this->FlagFileStream = 0;
this->CustomCommandDriver = OnBuild; this->CustomCommandDriver = OnBuild;
this->FortranModuleDirectoryComputed = false; this->FortranModuleDirectoryComputed = false;
this->Target = target; this->Target = target->Target;
this->Makefile = this->Target->GetMakefile(); this->Makefile = this->Target->GetMakefile();
this->LocalGenerator = this->LocalGenerator =
static_cast<cmLocalUnixMakefileGenerator3*>( static_cast<cmLocalUnixMakefileGenerator3*>(target->GetLocalGenerator());
this->Makefile->GetLocalGenerator());
this->ConfigName = this->LocalGenerator->ConfigurationName.c_str(); this->ConfigName = this->LocalGenerator->ConfigurationName.c_str();
this->GlobalGenerator = this->GlobalGenerator =
static_cast<cmGlobalUnixMakefileGenerator3*>( static_cast<cmGlobalUnixMakefileGenerator3*>(
this->LocalGenerator->GetGlobalGenerator()); this->LocalGenerator->GetGlobalGenerator());
this->GeneratorTarget = this->GlobalGenerator->GetGeneratorTarget(target); this->GeneratorTarget = target;
cmake* cm = this->GlobalGenerator->GetCMakeInstance(); cmake* cm = this->GlobalGenerator->GetCMakeInstance();
this->NoRuleMessages = false; this->NoRuleMessages = false;
if(const char* ruleStatus = cm->GetState() if(const char* ruleStatus = cm->GetState()
@ -1174,8 +1173,10 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
&& linkee->GetType() != cmTarget::INTERFACE_LIBRARY && linkee->GetType() != cmTarget::INTERFACE_LIBRARY
&& emitted.insert(linkee).second) && emitted.insert(linkee).second)
{ {
cmGeneratorTarget* gt =
this->GlobalGenerator->GetGeneratorTarget(linkee);
cmLocalGenerator* lg = gt->GetLocalGenerator();
cmMakefile* mf = linkee->GetMakefile(); cmMakefile* mf = linkee->GetMakefile();
cmLocalGenerator* lg = mf->GetLocalGenerator();
std::string di = mf->GetCurrentBinaryDirectory(); std::string di = mf->GetCurrentBinaryDirectory();
di += "/"; di += "/";
di += lg->GetTargetDirectory(*linkee); di += lg->GetTargetDirectory(*linkee);

View File

@ -34,7 +34,7 @@ class cmMakefileTargetGenerator
{ {
public: public:
// constructor to set the ivars // constructor to set the ivars
cmMakefileTargetGenerator(cmTarget* target); cmMakefileTargetGenerator(cmGeneratorTarget* target);
virtual ~cmMakefileTargetGenerator(); virtual ~cmMakefileTargetGenerator();
// construct using this factory call // construct using this factory call

View File

@ -21,7 +21,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmMakefileUtilityTargetGenerator cmMakefileUtilityTargetGenerator
::cmMakefileUtilityTargetGenerator(cmGeneratorTarget* target): ::cmMakefileUtilityTargetGenerator(cmGeneratorTarget* target):
cmMakefileTargetGenerator(target->Target) cmMakefileTargetGenerator(target)
{ {
this->CustomCommandDriver = OnUtility; this->CustomCommandDriver = OnUtility;
this->OSXBundleGenerator = new cmOSXBundleGenerator(target, this->OSXBundleGenerator = new cmOSXBundleGenerator(target,

View File

@ -32,7 +32,7 @@
cmNinjaNormalTargetGenerator:: cmNinjaNormalTargetGenerator::
cmNinjaNormalTargetGenerator(cmGeneratorTarget* target) cmNinjaNormalTargetGenerator(cmGeneratorTarget* target)
: cmNinjaTargetGenerator(target->Target) : cmNinjaTargetGenerator(target)
, TargetNameOut() , TargetNameOut()
, TargetNameSO() , TargetNameSO()
, TargetNameReal() , TargetNameReal()

View File

@ -57,19 +57,18 @@ cmNinjaTargetGenerator::New(cmGeneratorTarget* target)
} }
} }
cmNinjaTargetGenerator::cmNinjaTargetGenerator(cmTarget* target) cmNinjaTargetGenerator::cmNinjaTargetGenerator(cmGeneratorTarget* target)
: :
MacOSXContentGenerator(0), MacOSXContentGenerator(0),
OSXBundleGenerator(0), OSXBundleGenerator(0),
MacContentFolders(), MacContentFolders(),
Target(target), Target(target->Target),
Makefile(target->GetMakefile()), Makefile(target->Makefile),
LocalGenerator( LocalGenerator(
static_cast<cmLocalNinjaGenerator*>(Makefile->GetLocalGenerator())), static_cast<cmLocalNinjaGenerator*>(target->GetLocalGenerator())),
Objects() Objects()
{ {
this->GeneratorTarget = this->GeneratorTarget = target;
this->GetGlobalGenerator()->GetGeneratorTarget(target);
MacOSXContentGenerator = new MacOSXContentGeneratorType(this); MacOSXContentGenerator = new MacOSXContentGeneratorType(this);
} }

View File

@ -33,7 +33,7 @@ public:
static cmNinjaTargetGenerator* New(cmGeneratorTarget* target); static cmNinjaTargetGenerator* New(cmGeneratorTarget* target);
/// Build a NinjaTargetGenerator. /// Build a NinjaTargetGenerator.
cmNinjaTargetGenerator(cmTarget* target); cmNinjaTargetGenerator(cmGeneratorTarget* target);
/// Destructor. /// Destructor.
virtual ~cmNinjaTargetGenerator(); virtual ~cmNinjaTargetGenerator();

View File

@ -21,7 +21,7 @@
cmNinjaUtilityTargetGenerator::cmNinjaUtilityTargetGenerator( cmNinjaUtilityTargetGenerator::cmNinjaUtilityTargetGenerator(
cmGeneratorTarget *target) cmGeneratorTarget *target)
: cmNinjaTargetGenerator(target->Target) {} : cmNinjaTargetGenerator(target) {}
cmNinjaUtilityTargetGenerator::~cmNinjaUtilityTargetGenerator() {} cmNinjaUtilityTargetGenerator::~cmNinjaUtilityTargetGenerator() {}

View File

@ -22,7 +22,7 @@ cmOSXBundleGenerator(cmGeneratorTarget* target,
const std::string& configName) const std::string& configName)
: GT(target) : GT(target)
, Makefile(target->Target->GetMakefile()) , Makefile(target->Target->GetMakefile())
, LocalGenerator(Makefile->GetLocalGenerator()) , LocalGenerator(target->GetLocalGenerator())
, ConfigName(configName) , ConfigName(configName)
, MacContentFolders(0) , MacContentFolders(0)
{ {

View File

@ -504,10 +504,10 @@ static void GetCompileDefinitionsAndDirectories(cmTarget const* target,
std::string &defs) std::string &defs)
{ {
cmMakefile* makefile = target->GetMakefile(); cmMakefile* makefile = target->GetMakefile();
cmLocalGenerator* localGen = makefile->GetLocalGenerator(); cmGlobalGenerator* globalGen = makefile->GetGlobalGenerator();
std::vector<std::string> includeDirs; std::vector<std::string> includeDirs;
cmGeneratorTarget *gtgt = localGen->GetGlobalGenerator() cmGeneratorTarget *gtgt = globalGen->GetGeneratorTarget(target);
->GetGeneratorTarget(target); cmLocalGenerator *localGen = gtgt->GetLocalGenerator();
// Get the include dirs for this target, without stripping the implicit // Get the include dirs for this target, without stripping the implicit
// include dirs off, see http://public.kitware.com/Bug/view.php?id=13667 // include dirs off, see http://public.kitware.com/Bug/view.php?id=13667
localGen->GetIncludeDirectories(includeDirs, gtgt, "CXX", config, false); localGen->GetIncludeDirectories(includeDirs, gtgt, "CXX", config, false);

View File

@ -176,7 +176,7 @@ cmVisualStudio10TargetGenerator(cmTarget* target,
this->Makefile->GetConfigurations(this->Configurations); this->Makefile->GetConfigurations(this->Configurations);
this->LocalGenerator = this->LocalGenerator =
(cmLocalVisualStudio7Generator*) (cmLocalVisualStudio7Generator*)
this->Makefile->GetLocalGenerator(); this->GeneratorTarget->GetLocalGenerator();
this->Name = this->Target->GetName(); this->Name = this->Target->GetName();
this->GUID = this->GlobalGenerator->GetGUID(this->Name.c_str()); this->GUID = this->GlobalGenerator->GetGUID(this->Name.c_str());
this->Platform = gg->GetPlatformName(); this->Platform = gg->GetPlatformName();

View File

@ -483,7 +483,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
std::string linkPath; std::string linkPath;
std::string flags; std::string flags;
std::string linkFlags; std::string linkFlags;
gg->CreateGeneratorTargets(mf); gg->CreateGeneratorTargets(lg.get());
cmGeneratorTarget *gtgt = gg->GetGeneratorTarget(tgt); cmGeneratorTarget *gtgt = gg->GetGeneratorTarget(tgt);
lg->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags, lg->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags,
gtgt, false); gtgt, false);