|
@@ -502,6 +502,12 @@ Json::Value CodemodelConfig::DumpTarget(cmGeneratorTarget* gt,
|
|
|
{
|
|
{
|
|
|
Target t(gt, this->Config);
|
|
Target t(gt, this->Config);
|
|
|
std::string prefix = "target-" + gt->GetName();
|
|
std::string prefix = "target-" + gt->GetName();
|
|
|
|
|
+ for (char& c : prefix) {
|
|
|
|
|
+ // CMP0037 OLD behavior allows slashes in target names. Remove them.
|
|
|
|
|
+ if (c == '/' || c == '\\') {
|
|
|
|
|
+ c = '_';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if (!this->Config.empty()) {
|
|
if (!this->Config.empty()) {
|
|
|
prefix += "-" + this->Config;
|
|
prefix += "-" + this->Config;
|
|
|
}
|
|
}
|