From ea17a03be5794a934991b1f958cab12b7011da74 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 15 Mar 2014 11:07:57 +0100 Subject: [PATCH] cmTarget: Port _LOCATION support to updated string APIs --- Source/cmTarget.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c07fd0f24..17c8a4d82 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2673,7 +2673,7 @@ const char *cmTarget::GetProperty(const std::string& prop, // Support "_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); } }