summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index dc3944c..15610e5 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -59,15 +59,22 @@ public:
std::vector<cmListFileBacktrace> LinkImplementationPropertyBacktraces;
};
-cmTarget::cmTarget()
+cmTarget::cmTarget(std::string const& name, cmState::TargetType type,
+ Visibility vis, cmMakefile* mf)
{
+ assert(mf || type == cmState::GLOBAL_TARGET);
this->Makefile = CM_NULLPTR;
this->HaveInstallRule = false;
this->DLLPlatform = false;
this->IsAndroid = false;
- this->IsImportedTarget = false;
- this->ImportedGloballyVisible = false;
+ this->IsImportedTarget =
+ (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)
@@ -1071,12 +1078,6 @@ void cmTarget::CheckProperty(const std::string& prop,
}
}
-void cmTarget::MarkAsImported(bool global)
-{
- this->IsImportedTarget = true;
- this->ImportedGloballyVisible = global;
-}
-
bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const
{
if (this->IsImported()) {