diff options
author | Brad King <brad.king@kitware.com> | 2019-09-03 13:21:28 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-03 13:21:47 (GMT) |
commit | 917cfecf12b77294370cf96150becbb4c0a9db1c (patch) | |
tree | c693715ca260dc81cd2184cbb06bef38bdbde906 /Source | |
parent | cfae4c657fb0fff18cffd294fc5516cddfc174d1 (diff) | |
parent | 9da1c33cf1613d2b5b8192c2cffefa87466b002f (diff) | |
download | CMake-917cfecf12b77294370cf96150becbb4c0a9db1c.zip CMake-917cfecf12b77294370cf96150becbb4c0a9db1c.tar.gz CMake-917cfecf12b77294370cf96150becbb4c0a9db1c.tar.bz2 |
Merge topic 'fileapi-CMP0037-OLD'
9da1c33cf1 fileapi: Fix codemodel v2 target file name for CMP0037 OLD behavior
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3760
Diffstat (limited to 'Source')
-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 08db7c7..eff32ea 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -582,6 +582,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; } |