diff options
author | Brad King <brad.king@kitware.com> | 2019-08-30 14:21:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-08-30 14:21:29 (GMT) |
commit | 1ae24ee1087c62740a9ed357a81274a9f9e8e70d (patch) | |
tree | d12bee491a6f65705687dbd869b6f9e7c81f4a09 | |
parent | aeeccc3b15c6476ecdaa51d40bb9500900d11ce2 (diff) | |
parent | 9da1c33cf1613d2b5b8192c2cffefa87466b002f (diff) | |
download | CMake-1ae24ee1087c62740a9ed357a81274a9f9e8e70d.zip CMake-1ae24ee1087c62740a9ed357a81274a9f9e8e70d.tar.gz CMake-1ae24ee1087c62740a9ed357a81274a9f9e8e70d.tar.bz2 |
Merge branch 'fileapi-CMP0037-OLD' into release-3.15
Merge-request: !3760
-rw-r--r-- | Source/cmFileAPICodemodel.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx index 6025025..fecbf63 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -502,6 +502,12 @@ Json::Value CodemodelConfig::DumpTarget(cmGeneratorTarget* gt, { Target t(gt, this->Config); 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()) { prefix += "-" + this->Config; } |