This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  917cfecf12b77294370cf96150becbb4c0a9db1c (commit)
       via  9da1c33cf1613d2b5b8192c2cffefa87466b002f (commit)
      from  cfae4c657fb0fff18cffd294fc5516cddfc174d1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=917cfecf12b77294370cf96150becbb4c0a9db1c
commit 917cfecf12b77294370cf96150becbb4c0a9db1c
Merge: cfae4c6 9da1c33
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Sep 3 13:21:28 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Tue Sep 3 09:21:47 2019 -0400

    Merge topic 'fileapi-CMP0037-OLD'
    
    9da1c33cf1 fileapi: Fix codemodel v2 target file name for CMP0037 OLD 
behavior
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !3760


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9da1c33cf1613d2b5b8192c2cffefa87466b002f
commit 9da1c33cf1613d2b5b8192c2cffefa87466b002f
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Aug 30 10:18:28 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Aug 30 10:20:12 2019 -0400

    fileapi: Fix codemodel v2 target file name for CMP0037 OLD behavior
    
    With CMP0037 OLD behavior, executable and library target names may
    contain a slash.  Avoid constructing file names with slashes.
    
    Fixes: #19653

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;
   }

-----------------------------------------------------------------------

Summary of changes:
 Source/cmFileAPICodemodel.cxx | 6 ++++++
 1 file changed, 6 insertions(+)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to