cmTarget: Don't set properties on custom targets
Properties are not required on custom targets.
This commit is contained in:
parent
660769151a
commit
b75fc0e1ad
|
@ -328,7 +328,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
|||
this->IsApple = this->Makefile->IsOn("APPLE");
|
||||
|
||||
// Setup default property values.
|
||||
if (this->GetType() != INTERFACE_LIBRARY)
|
||||
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
|
||||
{
|
||||
this->SetPropertyDefault("INSTALL_NAME_DIR", 0);
|
||||
this->SetPropertyDefault("INSTALL_RPATH", "");
|
||||
|
@ -369,6 +369,8 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
|||
mf->GetConfigurations(configNames);
|
||||
|
||||
// Setup per-configuration property default values.
|
||||
if (this->GetType() != UTILITY)
|
||||
{
|
||||
const char* configProps[] = {
|
||||
"ARCHIVE_OUTPUT_DIRECTORY_",
|
||||
"LIBRARY_OUTPUT_DIRECTORY_",
|
||||
|
@ -406,6 +408,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
|||
this->SetPropertyDefault(property, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Save the backtrace of target construction.
|
||||
this->Internal->Backtrace = this->Makefile->GetBacktrace();
|
||||
|
@ -442,7 +445,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
|||
}
|
||||
}
|
||||
|
||||
if (this->GetType() != INTERFACE_LIBRARY)
|
||||
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
|
||||
{
|
||||
this->SetPropertyDefault("C_VISIBILITY_PRESET", 0);
|
||||
this->SetPropertyDefault("CXX_VISIBILITY_PRESET", 0);
|
||||
|
@ -454,7 +457,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
|||
{
|
||||
this->SetProperty("POSITION_INDEPENDENT_CODE", "True");
|
||||
}
|
||||
if (this->GetType() != INTERFACE_LIBRARY)
|
||||
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
|
||||
{
|
||||
this->SetPropertyDefault("POSITION_INDEPENDENT_CODE", 0);
|
||||
}
|
||||
|
@ -476,8 +479,11 @@ void cmTarget::SetMakefile(cmMakefile* mf)
|
|||
this->PolicyStatusCMP0022 = cmPolicies::NEW;
|
||||
}
|
||||
|
||||
if (this->GetType() != INTERFACE_LIBRARY && this->GetType() != UTILITY)
|
||||
{
|
||||
this->SetPropertyDefault("JOB_POOL_COMPILE", 0);
|
||||
this->SetPropertyDefault("JOB_POOL_LINK", 0);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue