cmTarget: Port <CONFIG>_LOCATION support to updated string APIs

This commit is contained in:
Stephen Kelly 2014-03-15 11:07:57 +01:00 committed by Brad King
parent 6e466c6f2e
commit ea17a03be5
1 changed files with 2 additions and 2 deletions

View File

@ -2673,7 +2673,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
// Support "<CONFIG>_LOCATION".
if(cmHasLiteralSuffix(prop, "_LOCATION"))
{
std::string configName(prop, strlen(prop) - 9);
std::string configName(prop.c_str(), prop.size() - 9);
if(configName != "IMPORTED")
{
if (!this->HandleLocationPropertyPolicy())
@ -2681,7 +2681,7 @@ const char *cmTarget::GetProperty(const std::string& prop,
return 0;
}
this->Properties.SetProperty(prop,
this->GetLocation(configName.c_str()),
this->GetLocation(configName),
cmProperty::TARGET);
}
}