[Cmake-commits] CMake branch, master, updated. v3.14.3-827-g3b4315d

Kitware Robot kwrobot at kitware.com
Thu May 2 09:43:06 EDT 2019


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  3b4315dc23bdedb3163a0c84b9fdbae2324470c6 (commit)
       via  1ee21c6ec5ef783d2b960fc3e13161582cf22e10 (commit)
       via  b7b66919a3952a3a2c31d659fcbe3bebf7e5887e (commit)
       via  cab5471a7ba0f45273f293104f5d00d1af8284ac (commit)
       via  75643755a1492f3d07e811541207769341eb2b9e (commit)
       via  615fb2633cd6f4e7543eb172e10f32f09cad6d88 (commit)
       via  30c98db61be3e0079305514b98b2d3d07b6877cc (commit)
      from  3ee16ef31b78ff73d7a0c569fdb87b41f2a5e97d (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=3b4315dc23bdedb3163a0c84b9fdbae2324470c6
commit 3b4315dc23bdedb3163a0c84b9fdbae2324470c6
Merge: 1ee21c6 7564375
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 2 13:41:59 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 2 09:42:08 2019 -0400

    Merge topic 'code-cleanup-3'
    
    75643755a1 cmGlobalVisualStudioGenerator: remove redundant variables
    615fb2633c cmGlobalVisualStudioGenerator: use cmJoin to join the filenames
    30c98db61b cmGlobalVisualStudioGenerator: use auto instead of iterator types
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !3257


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ee21c6ec5ef783d2b960fc3e13161582cf22e10
commit 1ee21c6ec5ef783d2b960fc3e13161582cf22e10
Merge: 3ee16ef b7b6691
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 2 13:33:23 2019 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 2 09:33:33 2019 -0400

    Merge topic 'fix-swiftmix-test-for-xcode-10.2'
    
    b7b66919a3 SwiftMix: properly export SwiftMain method
    cab5471a7b SwiftMix: Get rid of pointer types mismatch warning
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !3279


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7b66919a3952a3a2c31d659fcbe3bebf7e5887e
commit b7b66919a3952a3a2c31d659fcbe3bebf7e5887e
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Wed May 1 13:24:34 2019 +0200
Commit:     Gregor Jasny <gjasny at googlemail.com>
CommitDate: Wed May 1 13:30:14 2019 +0200

    SwiftMix: properly export SwiftMain method

diff --git a/Tests/SwiftMix/CMakeLists.txt b/Tests/SwiftMix/CMakeLists.txt
index 5e50470..6d8e48b 100644
--- a/Tests/SwiftMix/CMakeLists.txt
+++ b/Tests/SwiftMix/CMakeLists.txt
@@ -3,3 +3,4 @@ project(SwiftMix C Swift)
 
 add_executable(SwiftMix CMain.c ObjCMain.m SwiftMain.swift ObjC-Swift.h)
 set_property(TARGET SwiftMix PROPERTY XCODE_ATTRIBUTE_SWIFT_OBJC_BRIDGING_HEADER "ObjC-Swift.h")
+target_compile_options(SwiftMix PRIVATE "$<$<COMPILE_LANGUAGE:C>:-Werror=objc-method-access>")
diff --git a/Tests/SwiftMix/SwiftMain.swift b/Tests/SwiftMix/SwiftMain.swift
index a4a0a62..d9c8cd7 100644
--- a/Tests/SwiftMix/SwiftMain.swift
+++ b/Tests/SwiftMix/SwiftMain.swift
@@ -1,7 +1,7 @@
 import Foundation
 
 @objc class SwiftMainClass : NSObject {
-  class func SwiftMain() -> Int32 {
+  @objc class func SwiftMain() -> Int32 {
     dump("Hello World!");
     return 0;
   }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cab5471a7ba0f45273f293104f5d00d1af8284ac
commit cab5471a7ba0f45273f293104f5d00d1af8284ac
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Wed May 1 13:23:23 2019 +0200
Commit:     Gregor Jasny <gjasny at googlemail.com>
CommitDate: Wed May 1 13:30:14 2019 +0200

    SwiftMix: Get rid of pointer types mismatch warning

diff --git a/Tests/SwiftMix/CMain.c b/Tests/SwiftMix/CMain.c
index 8877da4..519058e 100644
--- a/Tests/SwiftMix/CMain.c
+++ b/Tests/SwiftMix/CMain.c
@@ -1,5 +1,5 @@
-extern int ObjCMain(int argc, char const* const argv[]);
-int main(int argc, char* argv[])
+extern int ObjCMain(void);
+int main(void)
 {
-  return ObjCMain(argc, argv);
+  return ObjCMain();
 }
diff --git a/Tests/SwiftMix/ObjCMain.m b/Tests/SwiftMix/ObjCMain.m
index 20f0bf1..afc92438 100644
--- a/Tests/SwiftMix/ObjCMain.m
+++ b/Tests/SwiftMix/ObjCMain.m
@@ -1,4 +1,4 @@
 #import "SwiftMix-Swift.h"
-int ObjCMain(int argc, char const* const argv[]) {
+int ObjCMain(void) {
   return [SwiftMainClass SwiftMain];
 }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75643755a1492f3d07e811541207769341eb2b9e
commit 75643755a1492f3d07e811541207769341eb2b9e
Author:     Leonid Pospelov <pospelovlm at yandex.ru>
AuthorDate: Wed Apr 24 17:18:11 2019 +0300
Commit:     Leonid Pospelov <pospelovlm at yandex.ru>
CommitDate: Wed Apr 24 17:18:11 2019 +0300

    cmGlobalVisualStudioGenerator: remove redundant variables

diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index d457cc3..cd0355f 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -203,9 +203,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
 
       // Now make all targets depend on the ALL_BUILD target
       for (cmLocalGenerator const* i : gen) {
-        std::vector<cmGeneratorTarget*> const& targets =
-          i->GetGeneratorTargets();
-        for (cmGeneratorTarget* tgt : targets) {
+        for (cmGeneratorTarget* tgt : i->GetGeneratorTargets()) {
           if (tgt->GetType() == cmStateEnums::GLOBAL_TARGET ||
               tgt->IsImported()) {
             continue;
@@ -392,11 +390,8 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends()
     return false;
   }
   for (auto const& it : this->ProjectMap) {
-    std::vector<cmLocalGenerator*> const& gen = it.second;
-    for (const cmLocalGenerator* i : gen) {
-      std::vector<cmGeneratorTarget*> const& targets =
-        i->GetGeneratorTargets();
-      for (cmGeneratorTarget* ti : targets) {
+    for (const cmLocalGenerator* i : it.second) {
+      for (cmGeneratorTarget* ti : i->GetGeneratorTargets()) {
         this->ComputeVSTargetDepends(ti);
       }
     }
@@ -448,8 +443,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(
   std::set<cmGeneratorTarget const*> linkDepends;
   if (target->GetType() != cmStateEnums::STATIC_LIBRARY) {
     for (cmTargetDepend const& di : depends) {
-      cmTargetDepend dep = di;
-      if (dep.IsLink()) {
+      if (di.IsLink()) {
         this->FollowLinkDepends(di, linkDepends);
       }
     }
@@ -458,8 +452,7 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(
   // Collect explicit util dependencies (add_dependencies).
   std::set<cmGeneratorTarget const*> utilDepends;
   for (cmTargetDepend const& di : depends) {
-    cmTargetDepend dep = di;
-    if (dep.IsUtil()) {
+    if (di.IsUtil()) {
       this->FollowLinkDepends(di, utilDepends);
     }
   }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=615fb2633cd6f4e7543eb172e10f32f09cad6d88
commit 615fb2633cd6f4e7543eb172e10f32f09cad6d88
Author:     Leonid Pospelov <pospelovlm at yandex.ru>
AuthorDate: Tue Apr 23 00:54:05 2019 +0300
Commit:     Leonid Pospelov <pospelovlm at yandex.ru>
CommitDate: Tue Apr 23 00:54:05 2019 +0300

    cmGlobalVisualStudioGenerator: use cmJoin to join the filenames

diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index aa70522..d457cc3 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -318,17 +318,7 @@ void cmGlobalVisualStudioGenerator::CallVisualStudioMacro(
         std::vector<std::string> filenames;
         this->GetFilesReplacedDuringGenerate(filenames);
         if (!filenames.empty()) {
-          // Convert vector to semi-colon delimited string of filenames:
-          std::string projects;
-          std::vector<std::string>::iterator it = filenames.begin();
-          if (it != filenames.end()) {
-            projects = *it;
-            ++it;
-          }
-          for (; it != filenames.end(); ++it) {
-            projects += ";";
-            projects += *it;
-          }
+          std::string projects = cmJoin(filenames, ";");
           cmCallVisualStudioMacro::CallMacro(
             topLevelSlnName, CMAKE_VSMACROS_RELOAD_MACRONAME, projects,
             this->GetCMakeInstance()->GetDebugOutput());

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30c98db61be3e0079305514b98b2d3d07b6877cc
commit 30c98db61be3e0079305514b98b2d3d07b6877cc
Author:     Leonid Pospelov <pospelovlm at yandex.ru>
AuthorDate: Tue Apr 23 00:52:33 2019 +0300
Commit:     Leonid Pospelov <pospelovlm at yandex.ru>
CommitDate: Tue Apr 23 00:52:33 2019 +0300

    cmGlobalVisualStudioGenerator: use auto instead of iterator types

diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 39c325c..aa70522 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -368,7 +368,7 @@ void cmGlobalVisualStudioGenerator::FillLinkClosure(
 cmGlobalVisualStudioGenerator::TargetSet const&
 cmGlobalVisualStudioGenerator::GetTargetLinkClosure(cmGeneratorTarget* target)
 {
-  TargetSetMap::iterator i = this->TargetLinkClosure.find(target);
+  auto i = this->TargetLinkClosure.find(target);
   if (i == this->TargetLinkClosure.end()) {
     TargetSetMap::value_type entry(target, TargetSet());
     i = this->TargetLinkClosure.insert(entry).first;
@@ -513,7 +513,7 @@ bool cmGlobalVisualStudioGenerator::FindMakeProgram(cmMakefile* mf)
 std::string cmGlobalVisualStudioGenerator::GetUtilityDepend(
   cmGeneratorTarget const* target)
 {
-  UtilityDependsMap::iterator i = this->UtilityDepends.find(target);
+  auto i = this->UtilityDepends.find(target);
   if (i == this->UtilityDepends.end()) {
     std::string name = this->WriteUtilityDepend(target);
     UtilityDependsMap::value_type entry(target, name);
@@ -939,11 +939,10 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand(
     std::vector<std::string> objs;
     for (cmSourceFile const* it : objectSources) {
       // Find the object file name corresponding to this source file.
-      std::map<cmSourceFile const*, std::string>::const_iterator map_it =
-        mapping.find(it);
       // It must exist because we populated the mapping just above.
-      assert(!map_it->second.empty());
-      std::string objFile = obj_dir + map_it->second;
+      const auto& v = mapping[it];
+      assert(!v.empty());
+      std::string objFile = obj_dir + v;
       objs.push_back(objFile);
     }
     std::vector<cmSourceFile const*> externalObjectSources;

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

Summary of changes:
 Source/cmGlobalVisualStudioGenerator.cxx | 40 +++++++++-----------------------
 Tests/SwiftMix/CMain.c                   |  6 ++---
 Tests/SwiftMix/CMakeLists.txt            |  1 +
 Tests/SwiftMix/ObjCMain.m                |  2 +-
 Tests/SwiftMix/SwiftMain.swift           |  2 +-
 5 files changed, 17 insertions(+), 34 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list