cmTarget: Inline SetType method at only remaining call site
This commit is contained in:
parent
00e78c1990
commit
7a2e114dd8
|
@ -63,6 +63,8 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type,
|
|||
Visibility vis, cmMakefile* mf)
|
||||
{
|
||||
assert(mf || type == cmState::GLOBAL_TARGET);
|
||||
this->Name = name;
|
||||
this->TargetTypeValue = type;
|
||||
this->Makefile = CM_NULLPTR;
|
||||
this->HaveInstallRule = false;
|
||||
this->DLLPlatform = false;
|
||||
|
@ -71,23 +73,18 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type,
|
|||
(vis == VisibilityImported || vis == VisibilityImportedGlobally);
|
||||
this->ImportedGloballyVisible = vis == VisibilityImportedGlobally;
|
||||
this->BuildInterfaceIncludesAppended = false;
|
||||
this->SetType(type, name);
|
||||
if (mf) {
|
||||
this->SetMakefile(mf);
|
||||
}
|
||||
}
|
||||
|
||||
void cmTarget::SetType(cmState::TargetType type, const std::string& name)
|
||||
{
|
||||
this->Name = name;
|
||||
// only add dependency information for library targets
|
||||
this->TargetTypeValue = type;
|
||||
if (this->TargetTypeValue >= cmState::STATIC_LIBRARY &&
|
||||
this->TargetTypeValue <= cmState::MODULE_LIBRARY) {
|
||||
this->RecordDependencies = true;
|
||||
} else {
|
||||
this->RecordDependencies = false;
|
||||
}
|
||||
|
||||
if (mf) {
|
||||
this->SetMakefile(mf);
|
||||
}
|
||||
}
|
||||
|
||||
cmTarget cmTarget::CopyForDirectory(cmMakefile* mf) const
|
||||
|
|
|
@ -283,7 +283,6 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
void SetType(cmState::TargetType f, const std::string& name);
|
||||
void SetMakefile(cmMakefile* mf);
|
||||
|
||||
bool HandleLocationPropertyPolicy(cmMakefile* context) const;
|
||||
|
|
Loading…
Reference in New Issue