summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-12-30 21:05:55 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-01-06 16:25:10 (GMT)
commitfa651c7a198d5c20e2bcb06df4673ec1a270d4d3 (patch)
treeb643c46f7d1912936de1caf3befb0c7b805599cd /Source/cmTarget.cxx
parent61d138aea2df9df2da7fa817b47131c73557fbdb (diff)
downloadCMake-fa651c7a198d5c20e2bcb06df4673ec1a270d4d3.zip
CMake-fa651c7a198d5c20e2bcb06df4673ec1a270d4d3.tar.gz
CMake-fa651c7a198d5c20e2bcb06df4673ec1a270d4d3.tar.bz2
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.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 91bd90f..3d1a4d4 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1403,14 +1403,10 @@ static bool whiteListedInterfaceProperty(const char *prop)
"COMPATIBLE_INTERFACE_NUMBER_MAX",
"COMPATIBLE_INTERFACE_NUMBER_MIN",
"COMPATIBLE_INTERFACE_STRING",
- "EXCLUDE_FROM_ALL",
- "EXCLUDE_FROM_DEFAULT_BUILD",
"EXPORT_NAME",
- "IMPORTED_LINK_INTERFACE_LANGUAGES",
"IMPORTED",
"NAME",
- "TYPE",
- "VERSION"
+ "TYPE"
};
if (std::binary_search(cmArrayBegin(builtIns),
@@ -1421,9 +1417,7 @@ static bool whiteListedInterfaceProperty(const char *prop)
return true;
}
- if (cmHasLiteralPrefix(prop, "EXCLUDE_FROM_DEFAULT_BUILD_")
- || cmHasLiteralPrefix(prop, "IMPORTED_LINK_INTERFACE_LANGUAGES_")
- || cmHasLiteralPrefix(prop, "MAP_IMPORTED_CONFIG_"))
+ if (cmHasLiteralPrefix(prop, "MAP_IMPORTED_CONFIG_"))
{
return true;
}
@@ -2576,6 +2570,8 @@ void cmTarget::GetTargetVersion(bool soversion,
minor = 0;
patch = 0;
+ assert(this->GetType() != INTERFACE_LIBRARY);
+
// Look for a VERSION or SOVERSION property.
const char* prop = soversion? "SOVERSION" : "VERSION";
if(const char* version = this->GetProperty(prop))
@@ -3588,6 +3584,8 @@ void cmTarget::GetLibraryNames(std::string& name,
return;
}
+ assert(this->GetType() != INTERFACE_LIBRARY);
+
// Check for library version properties.
const char* version = this->GetProperty("VERSION");
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
{
+ assert(this->GetType() != INTERFACE_LIBRARY);
+
if(const char* fversion = this->GetProperty("FRAMEWORK_VERSION"))
{
return fversion;