cmTarget: Remove unused support for partial construction
We no longer need to support partial construction for cmTarget instances of type GLOBAL_TARGET. Require all constructor arguments up front.
This commit is contained in:
parent
fa3897b24e
commit
9353d991a4
|
@ -62,10 +62,10 @@ public:
|
||||||
cmTarget::cmTarget(std::string const& name, cmState::TargetType type,
|
cmTarget::cmTarget(std::string const& name, cmState::TargetType type,
|
||||||
Visibility vis, cmMakefile* mf)
|
Visibility vis, cmMakefile* mf)
|
||||||
{
|
{
|
||||||
assert(mf || type == cmState::GLOBAL_TARGET);
|
assert(mf);
|
||||||
this->Name = name;
|
this->Name = name;
|
||||||
this->TargetTypeValue = type;
|
this->TargetTypeValue = type;
|
||||||
this->Makefile = CM_NULLPTR;
|
this->Makefile = mf;
|
||||||
this->HaveInstallRule = false;
|
this->HaveInstallRule = false;
|
||||||
this->DLLPlatform = false;
|
this->DLLPlatform = false;
|
||||||
this->IsAndroid = false;
|
this->IsAndroid = false;
|
||||||
|
@ -82,25 +82,6 @@ cmTarget::cmTarget(std::string const& name, cmState::TargetType type,
|
||||||
this->RecordDependencies = false;
|
this->RecordDependencies = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mf) {
|
|
||||||
this->SetMakefile(mf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cmTarget cmTarget::CopyForDirectory(cmMakefile* mf) const
|
|
||||||
{
|
|
||||||
assert(this->GetType() == cmState::GLOBAL_TARGET);
|
|
||||||
assert(this->GetMakefile() == CM_NULLPTR);
|
|
||||||
cmTarget result(*this);
|
|
||||||
result.SetMakefile(mf);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void cmTarget::SetMakefile(cmMakefile* mf)
|
|
||||||
{
|
|
||||||
// Set our makefile.
|
|
||||||
this->Makefile = mf;
|
|
||||||
|
|
||||||
// Check whether this is a DLL platform.
|
// Check whether this is a DLL platform.
|
||||||
this->DLLPlatform =
|
this->DLLPlatform =
|
||||||
(this->Makefile->IsOn("WIN32") || this->Makefile->IsOn("CYGWIN") ||
|
(this->Makefile->IsOn("WIN32") || this->Makefile->IsOn("CYGWIN") ||
|
||||||
|
|
|
@ -88,9 +88,6 @@ public:
|
||||||
///! Set/Get the name of the target
|
///! Set/Get the name of the target
|
||||||
const std::string& GetName() const { return this->Name; }
|
const std::string& GetName() const { return this->Name; }
|
||||||
|
|
||||||
/** Get a copy of this target adapted for the given directory. */
|
|
||||||
cmTarget CopyForDirectory(cmMakefile* mf) const;
|
|
||||||
|
|
||||||
/** Get the cmMakefile that owns this target. */
|
/** Get the cmMakefile that owns this target. */
|
||||||
cmMakefile* GetMakefile() const { return this->Makefile; }
|
cmMakefile* GetMakefile() const { return this->Makefile; }
|
||||||
|
|
||||||
|
@ -283,8 +280,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetMakefile(cmMakefile* mf);
|
|
||||||
|
|
||||||
bool HandleLocationPropertyPolicy(cmMakefile* context) const;
|
bool HandleLocationPropertyPolicy(cmMakefile* context) const;
|
||||||
|
|
||||||
const char* GetSuffixVariableInternal(bool implib) const;
|
const char* GetSuffixVariableInternal(bool implib) const;
|
||||||
|
|
Loading…
Reference in New Issue