VS: Refactor logic deciding to add "Deploy" to the .sln file
Move the condition to a "NeedsDeploy" virtual method that can be overridden by more recent VS generators.
This commit is contained in:
parent
66edd06587
commit
fe161dc30d
|
@ -398,9 +398,7 @@ cmGlobalVisualStudio8Generator
|
||||||
platformMapping : this->GetPlatformName())
|
platformMapping : this->GetPlatformName())
|
||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
bool needsDeploy = (type == cmTarget::EXECUTABLE ||
|
if(this->NeedsDeploy(type))
|
||||||
type == cmTarget::SHARED_LIBRARY);
|
|
||||||
if(this->TargetsWindowsCE() && needsDeploy)
|
|
||||||
{
|
{
|
||||||
fout << "\t\t{" << guid << "}." << *i
|
fout << "\t\t{" << guid << "}." << *i
|
||||||
<< "|" << this->GetPlatformName() << ".Deploy.0 = " << *i << "|"
|
<< "|" << this->GetPlatformName() << ".Deploy.0 = " << *i << "|"
|
||||||
|
@ -411,6 +409,15 @@ cmGlobalVisualStudio8Generator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
bool
|
||||||
|
cmGlobalVisualStudio8Generator::NeedsDeploy(cmTarget::TargetType type) const
|
||||||
|
{
|
||||||
|
bool needsDeploy = (type == cmTarget::EXECUTABLE ||
|
||||||
|
type == cmTarget::SHARED_LIBRARY);
|
||||||
|
return this->TargetsWindowsCE() && needsDeploy;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmGlobalVisualStudio8Generator::ComputeTargetDepends()
|
bool cmGlobalVisualStudio8Generator::ComputeTargetDepends()
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,6 +77,9 @@ protected:
|
||||||
|
|
||||||
bool AddCheckTarget();
|
bool AddCheckTarget();
|
||||||
|
|
||||||
|
/** Return true if the configuration needs to be deployed */
|
||||||
|
virtual bool NeedsDeploy(cmTarget::TargetType type) const;
|
||||||
|
|
||||||
static cmIDEFlagTable const* GetExtraFlagTableVS8();
|
static cmIDEFlagTable const* GetExtraFlagTableVS8();
|
||||||
virtual void WriteSLNHeader(std::ostream& fout);
|
virtual void WriteSLNHeader(std::ostream& fout);
|
||||||
virtual void WriteSolutionConfigurations(std::ostream& fout);
|
virtual void WriteSolutionConfigurations(std::ostream& fout);
|
||||||
|
|
Loading…
Reference in New Issue