Merge topic 'clean-up-GHS'
f69dcdfc
GHS: Remove call to SetCurrentLocalGenerator.a4d230af
GHS: Don't attempt to generate for IMPORTED or INTERFACE targets.550e08b0
GHS: Remove unnecessary condition.d34467cd
GHS: Remove unused CustomCommandUseLocal.9afc9e84
GHS: Remove BuildFileName.73245e59
GHS: Remove unnecessary Configure override.
This commit is contained in:
commit
94e4b5d2c3
|
@ -35,9 +35,7 @@ cmGlobalGhsMultiGenerator::~cmGlobalGhsMultiGenerator()
|
||||||
cmLocalGenerator *
|
cmLocalGenerator *
|
||||||
cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
|
cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmLocalGenerator* parent)
|
||||||
{
|
{
|
||||||
cmLocalGenerator *lg = new cmLocalGhsMultiGenerator(this, parent);
|
return new cmLocalGhsMultiGenerator(this, parent);
|
||||||
this->SetCurrentLocalGenerator(lg);
|
|
||||||
return lg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalGhsMultiGenerator::GetDocumentation(cmDocumentationEntry &entry)
|
void cmGlobalGhsMultiGenerator::GetDocumentation(cmDocumentationEntry &entry)
|
||||||
|
|
|
@ -27,31 +27,16 @@ cmLocalGhsMultiGenerator::~cmLocalGhsMultiGenerator() {}
|
||||||
void cmLocalGhsMultiGenerator::Generate()
|
void cmLocalGhsMultiGenerator::Generate()
|
||||||
{
|
{
|
||||||
cmGeneratorTargetsType tgts = this->GetMakefile()->GetGeneratorTargets();
|
cmGeneratorTargetsType tgts = this->GetMakefile()->GetGeneratorTargets();
|
||||||
if (!tgts.empty())
|
|
||||||
{
|
|
||||||
for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end();
|
for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end();
|
||||||
++l)
|
++l)
|
||||||
{
|
{
|
||||||
|
if (l->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY
|
||||||
|
|| l->second->Target->IsImported())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
cmGhsMultiTargetGenerator tg(l->second->Target);
|
cmGhsMultiTargetGenerator tg(l->second->Target);
|
||||||
tg.Generate();
|
tg.Generate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Implemented in:
|
|
||||||
// cmLocalGenerator.
|
|
||||||
// Used in:
|
|
||||||
// Source/cmMakefile.cxx
|
|
||||||
// Source/cmGlobalGenerator.cxx
|
|
||||||
void cmLocalGhsMultiGenerator::Configure()
|
|
||||||
{
|
|
||||||
// Compute the path to use when referencing the current output
|
|
||||||
// directory from the top output directory.
|
|
||||||
this->HomeRelativeOutputPath =
|
|
||||||
this->Convert(this->Makefile->GetCurrentBinaryDirectory(), HOME_OUTPUT);
|
|
||||||
if (this->HomeRelativeOutputPath == ".")
|
|
||||||
{
|
|
||||||
this->HomeRelativeOutputPath = "";
|
|
||||||
}
|
|
||||||
this->cmLocalGenerator::Configure();
|
|
||||||
}
|
|
||||||
|
|
|
@ -29,28 +29,10 @@ public:
|
||||||
|
|
||||||
virtual ~cmLocalGhsMultiGenerator();
|
virtual ~cmLocalGhsMultiGenerator();
|
||||||
|
|
||||||
/// @returns the relative path between the HomeOutputDirectory and this
|
|
||||||
/// local generators StartOutputDirectory.
|
|
||||||
std::string GetHomeRelativeOutputPath() const
|
|
||||||
{
|
|
||||||
return this->HomeRelativeOutputPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the makefile for this directory.
|
* Generate the makefile for this directory.
|
||||||
*/
|
*/
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
|
|
||||||
/// Overloaded methods. @see cmLocalGenerator::Configure()
|
|
||||||
virtual void Configure();
|
|
||||||
const char *GetBuildFileName() { return this->BuildFileName.c_str(); }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual bool CustomCommandUseLocal() const { return true; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
std::string BuildFileName;
|
|
||||||
std::string HomeRelativeOutputPath;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue