diff options
author | Brad King <brad.king@kitware.com> | 2016-09-14 14:34:36 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-14 14:50:40 -0400 |
commit | 7a2e114dd8ab55bc9ef9e1106ae352d2fea558d3 (patch) | |
tree | 786d2e40564f30acf0e2bb3cca795d5ba2c7c6d1 /Source | |
parent | 00e78c19903c24bb7cc969f3b825b2502661f3c0 (diff) | |
download | cmake-7a2e114dd8ab55bc9ef9e1106ae352d2fea558d3.tar.gz |
cmTarget: Inline SetType method at only remaining call site
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 15 | ||||
-rw-r--r-- | Source/cmTarget.h | 1 |
2 files changed, 6 insertions, 10 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 15610e5376..d964f0021e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -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 diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 8a1d27e07b..ebc92f31a9 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -283,7 +283,6 @@ public: }; private: - void SetType(cmState::TargetType f, const std::string& name); void SetMakefile(cmMakefile* mf); bool HandleLocationPropertyPolicy(cmMakefile* context) const; |