summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-22 13:41:30 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-11-22 13:41:30 (GMT)
commit1744ad9257c3b9fc5badc31d746acd8d2fa30f9e (patch)
tree62471abb61d4018627ec4dc01a3ede59ddc3c90b /Source/cmTarget.cxx
parentd121a8cb66c7f610c57aa6447f7671a5dd4a8730 (diff)
parent4fe963f656c48b1f2fd0b4a2f427bb376f619c37 (diff)
downloadCMake-1744ad9257c3b9fc5badc31d746acd8d2fa30f9e.zip
CMake-1744ad9257c3b9fc5badc31d746acd8d2fa30f9e.tar.gz
CMake-1744ad9257c3b9fc5badc31d746acd8d2fa30f9e.tar.bz2
Merge topic 'add-cmHasLiteralPrefix'
4fe963f Use new cmHasLiteralPrefix function 7d4b2b2 cmStandardIncludes: Add new cmHasLiteralPrefix function.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index cf68e38..120a666 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -560,7 +560,7 @@ cmSourceFile* cmTarget::AddSource(const char* s)
//----------------------------------------------------------------------------
void cmTarget::ProcessSourceExpression(std::string const& expr)
{
- if(strncmp(expr.c_str(), "$<TARGET_OBJECTS:", 17) == 0 &&
+ if(cmHasLiteralPrefix(expr.c_str(), "$<TARGET_OBJECTS:") &&
expr[expr.size()-1] == '>')
{
std::string objLibName = expr.substr(17, expr.size()-18);
@@ -2199,11 +2199,11 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list,
void cmTarget::MaybeInvalidatePropertyCache(const char* prop)
{
// Wipe out maps caching information affected by this property.
- if(this->IsImported() && strncmp(prop, "IMPORTED", 8) == 0)
+ if(this->IsImported() && cmHasLiteralPrefix(prop, "IMPORTED"))
{
this->Internal->ImportInfoMap.clear();
}
- if(!this->IsImported() && strncmp(prop, "LINK_INTERFACE_", 15) == 0)
+ if(!this->IsImported() && cmHasLiteralPrefix(prop, "LINK_INTERFACE_"))
{
this->ClearLinkMaps();
}
@@ -2279,21 +2279,21 @@ static void cmTargetCheckINTERFACE_LINK_LIBRARIES(const char* value,
void cmTarget::CheckProperty(const char* prop, cmMakefile* context) const
{
// Certain properties need checking.
- if(strncmp(prop, "LINK_INTERFACE_LIBRARIES", 24) == 0)
+ if(cmHasLiteralPrefix(prop, "LINK_INTERFACE_LIBRARIES"))
{
if(const char* value = this->GetProperty(prop))
{
cmTargetCheckLINK_INTERFACE_LIBRARIES(prop, value, context, false);
}
}
- if(strncmp(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES", 33) == 0)
+ if(cmHasLiteralPrefix(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES"))
{
if(const char* value = this->GetProperty(prop))
{
cmTargetCheckLINK_INTERFACE_LIBRARIES(prop, value, context, true);
}
}
- if(strncmp(prop, "INTERFACE_LINK_LIBRARIES", 24) == 0)
+ if(cmHasLiteralPrefix(prop, "INTERFACE_LINK_LIBRARIES"))
{
if(const char* value = this->GetProperty(prop))
{
@@ -2595,7 +2595,7 @@ const char *cmTarget::GetProperty(const char* prop,
}
// Support "LOCATION_<CONFIG>".
- if(strncmp(prop, "LOCATION_", 9) == 0)
+ if(cmHasLiteralPrefix(prop, "LOCATION_"))
{
if (!this->HandleLocationPropertyPolicy())
{