cmTarget: Restore <CONFIG>_LOCATION to CMP0026 OLD behavior (#14808)

Restore support for the undocumented <CONFIG>_LOCATION target property
removed by commit v3.0.0-rc1~175^2 (cmTarget: Remove support for
<CONFIG>_LOCATION property, 2013-12-30) as part of the CMP0026 OLD
behavior.
This commit is contained in:
Stephen Kelly
2014-03-15 09:18:39 +01:00
committed by Brad King
parent 59d3898bc7
commit c903b5319b
21 changed files with 117 additions and 3 deletions
+15
View File
@@ -2730,6 +2730,21 @@ const char *cmTarget::GetProperty(const char* prop,
this->GetLocation(configName.c_str()),
cmProperty::TARGET);
}
// Support "<CONFIG>_LOCATION".
if(cmHasLiteralSuffix(prop, "_LOCATION"))
{
std::string configName(prop, strlen(prop) - 9);
if(configName != "IMPORTED")
{
if (!this->HandleLocationPropertyPolicy())
{
return 0;
}
this->Properties.SetProperty(prop,
this->GetLocation(configName.c_str()),
cmProperty::TARGET);
}
}
}
if(strcmp(prop,"INCLUDE_DIRECTORIES") == 0)
{