Remove extra slashes from LOCATION target property value

In commit v3.0.0-rc1~429^2~2 (Remove the Location member from cmTarget,
2012-10-07) a few extra slashes were added to the path construction
logic, perhaps due to a partially implemented attempt at handling the
case that GetDirectory returns an empty string.  This leads to LOCATION
paths with double slashes in some cases.  Remove them now.
This commit is contained in:
Brad King 2014-09-22 09:30:52 -04:00
parent 0ab2718448
commit 92b2c6189d

View File

@ -2769,16 +2769,11 @@ const char* cmTarget::GetLocationForBuild() const
// Now handle the deprecated build-time configuration location.
location = this->GetDirectory();
if(!location.empty())
{
location += "/";
}
const char* cfgid = this->Makefile->GetDefinition("CMAKE_CFG_INTDIR");
if(cfgid && strcmp(cfgid, ".") != 0)
{
location += "/";
location += cfgid;
location += "/";
}
if(this->IsAppBundleOnApple())