cmTarget: Remove some of the INTERFACE_LIBRARY whitelisted properties.
There is no need to allow EXCLUDE_* properties, because an INTERFACE_LIBRARY has no direct build output. IMPORTED_LINK_INTERFACE_LANGUAGES are relevant only to static libraries. VERSION is relevant only to the filename of direct build outputs, which INTERFACE_LIBRARY does not have.
This commit is contained in:
parent
61d138aea2
commit
fa651c7a19
|
@ -488,7 +488,8 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
||||||
dir.c_str());
|
dir.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!target.GetPropertyAsBool("EXCLUDE_FROM_ALL"))
|
if(target.GetType() != cmTarget::INTERFACE_LIBRARY
|
||||||
|
&& !target.GetPropertyAsBool("EXCLUDE_FROM_ALL"))
|
||||||
{
|
{
|
||||||
allbuild->AddUtility(target.GetName());
|
allbuild->AddUtility(target.GetName());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1403,14 +1403,10 @@ static bool whiteListedInterfaceProperty(const char *prop)
|
||||||
"COMPATIBLE_INTERFACE_NUMBER_MAX",
|
"COMPATIBLE_INTERFACE_NUMBER_MAX",
|
||||||
"COMPATIBLE_INTERFACE_NUMBER_MIN",
|
"COMPATIBLE_INTERFACE_NUMBER_MIN",
|
||||||
"COMPATIBLE_INTERFACE_STRING",
|
"COMPATIBLE_INTERFACE_STRING",
|
||||||
"EXCLUDE_FROM_ALL",
|
|
||||||
"EXCLUDE_FROM_DEFAULT_BUILD",
|
|
||||||
"EXPORT_NAME",
|
"EXPORT_NAME",
|
||||||
"IMPORTED_LINK_INTERFACE_LANGUAGES",
|
|
||||||
"IMPORTED",
|
"IMPORTED",
|
||||||
"NAME",
|
"NAME",
|
||||||
"TYPE",
|
"TYPE"
|
||||||
"VERSION"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (std::binary_search(cmArrayBegin(builtIns),
|
if (std::binary_search(cmArrayBegin(builtIns),
|
||||||
|
@ -1421,9 +1417,7 @@ static bool whiteListedInterfaceProperty(const char *prop)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmHasLiteralPrefix(prop, "EXCLUDE_FROM_DEFAULT_BUILD_")
|
if (cmHasLiteralPrefix(prop, "MAP_IMPORTED_CONFIG_"))
|
||||||
|| cmHasLiteralPrefix(prop, "IMPORTED_LINK_INTERFACE_LANGUAGES_")
|
|
||||||
|| cmHasLiteralPrefix(prop, "MAP_IMPORTED_CONFIG_"))
|
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2576,6 +2570,8 @@ void cmTarget::GetTargetVersion(bool soversion,
|
||||||
minor = 0;
|
minor = 0;
|
||||||
patch = 0;
|
patch = 0;
|
||||||
|
|
||||||
|
assert(this->GetType() != INTERFACE_LIBRARY);
|
||||||
|
|
||||||
// Look for a VERSION or SOVERSION property.
|
// Look for a VERSION or SOVERSION property.
|
||||||
const char* prop = soversion? "SOVERSION" : "VERSION";
|
const char* prop = soversion? "SOVERSION" : "VERSION";
|
||||||
if(const char* version = this->GetProperty(prop))
|
if(const char* version = this->GetProperty(prop))
|
||||||
|
@ -3588,6 +3584,8 @@ void cmTarget::GetLibraryNames(std::string& name,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(this->GetType() != INTERFACE_LIBRARY);
|
||||||
|
|
||||||
// Check for library version properties.
|
// Check for library version properties.
|
||||||
const char* version = this->GetProperty("VERSION");
|
const char* version = this->GetProperty("VERSION");
|
||||||
const char* soversion = this->GetProperty("SOVERSION");
|
const char* soversion = this->GetProperty("SOVERSION");
|
||||||
|
@ -4163,6 +4161,8 @@ std::string cmTarget::GetOutputName(const char* config, bool implib) const
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
std::string cmTarget::GetFrameworkVersion() const
|
std::string cmTarget::GetFrameworkVersion() const
|
||||||
{
|
{
|
||||||
|
assert(this->GetType() != INTERFACE_LIBRARY);
|
||||||
|
|
||||||
if(const char* fversion = this->GetProperty("FRAMEWORK_VERSION"))
|
if(const char* fversion = this->GetProperty("FRAMEWORK_VERSION"))
|
||||||
{
|
{
|
||||||
return fversion;
|
return fversion;
|
||||||
|
|
Loading…
Reference in New Issue