[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-256-gd808f0f

Stephen Kelly steveire at gmail.com
Fri Oct 7 16:06:07 EDT 2016


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, next has been updated
       via  d808f0fdad129f19f1607aa5585a5642fcecf01a (commit)
       via  f17210aec9bf7db8272ab7ce7eea7addd07587fd (commit)
      from  61e69451ace821aaa94a9ba2b2f4e15140222736 (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=d808f0fdad129f19f1607aa5585a5642fcecf01a
commit d808f0fdad129f19f1607aa5585a5642fcecf01a
Merge: 61e6945 f17210a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 7 16:06:06 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Oct 7 16:06:06 2016 -0400

    Merge topic 'clean-up-link-configuration' into next
    
    f17210ae Fix style


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f17210aec9bf7db8272ab7ce7eea7addd07587fd
commit f17210aec9bf7db8272ab7ce7eea7addd07587fd
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Oct 7 22:05:47 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Oct 7 22:05:47 2016 +0200

    Fix style

diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index b2da329..56a469d 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -338,25 +338,22 @@ void CCONV cmAddCustomCommandToTarget(void* arg, const char* target,
 }
 
 static void addLinkLibrary(cmMakefile* mf, std::string const& target,
-         std::string const& lib, cmTargetLinkLibraryType llt)
+                           std::string const& lib, cmTargetLinkLibraryType llt)
 {
   cmTarget* t = mf->FindLocalNonAliasTarget(target);
-  if (!t)
-    {
+  if (!t) {
     std::ostringstream e;
-    e << "Attempt to add link library \""
-      << lib << "\" to target \""
-      << target << "\" which is not built in this directory.";
+    e << "Attempt to add link library \"" << lib << "\" to target \"" << target
+      << "\" which is not built in this directory.";
     mf->IssueMessage(cmake::FATAL_ERROR, e.str());
     return;
-    }
+  }
 
   cmTarget* tgt = mf->GetGlobalGenerator()->FindTarget(lib);
-  if(tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) &&
-         (tgt->GetType() != cmState::SHARED_LIBRARY) &&
-         (tgt->GetType() != cmState::INTERFACE_LIBRARY) &&
-         !tgt->IsExecutableWithExports())
-    {
+  if (tgt && (tgt->GetType() != cmState::STATIC_LIBRARY) &&
+      (tgt->GetType() != cmState::SHARED_LIBRARY) &&
+      (tgt->GetType() != cmState::INTERFACE_LIBRARY) &&
+      !tgt->IsExecutableWithExports()) {
     std::ostringstream e;
     e << "Target \"" << lib << "\" of type "
       << cmState::GetTargetTypeName(tgt->GetType())
@@ -364,9 +361,9 @@ static void addLinkLibrary(cmMakefile* mf, std::string const& target,
       << "One may link only to STATIC or SHARED libraries, or "
       << "to executables with the ENABLE_EXPORTS property set.";
     mf->IssueMessage(cmake::FATAL_ERROR, e.str());
-    }
+  }
 
-  t->AddLinkLibrary( *mf, lib, llt );
+  t->AddLinkLibrary(*mf, lib, llt);
 }
 
 void CCONV cmAddLinkLibraryForTarget(void* arg, const char* tgt,
@@ -376,13 +373,13 @@ void CCONV cmAddLinkLibraryForTarget(void* arg, const char* tgt,
 
   switch (libtype) {
     case CM_LIBRARY_GENERAL:
-      addLinkLibrary(mf, tgt,value, GENERAL_LibraryType);
+      addLinkLibrary(mf, tgt, value, GENERAL_LibraryType);
       break;
     case CM_LIBRARY_DEBUG:
-      addLinkLibrary(mf, tgt,value, DEBUG_LibraryType);
+      addLinkLibrary(mf, tgt, value, DEBUG_LibraryType);
       break;
     case CM_LIBRARY_OPTIMIZED:
-      addLinkLibrary(mf, tgt,value, OPTIMIZED_LibraryType);
+      addLinkLibrary(mf, tgt, value, OPTIMIZED_LibraryType);
       break;
   }
 }
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d443423..6ab45bb 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1238,8 +1238,7 @@ void cmMakefile::InitializeFromParent(cmMakefile* parent)
   }
 
   // link libraries
-  this->SetProperty("LINK_LIBRARIES",
-                    parent->GetProperty("LINK_LIBRARIES"));
+  this->SetProperty("LINK_LIBRARIES", parent->GetProperty("LINK_LIBRARIES"));
 
   // link directories
   this->SetProperty("LINK_DIRECTORIES",
@@ -1804,14 +1803,11 @@ void cmMakefile::AddGlobalLinkInformation(cmTarget& target)
          j != linkLibs.end(); ++j) {
       std::string libraryName = *j;
       cmTargetLinkLibraryType libType = GENERAL_LibraryType;
-      if (libraryName == "optimized")
-      {
+      if (libraryName == "optimized") {
         libType = OPTIMIZED_LibraryType;
         ++j;
         libraryName = *j;
-      } else
-      if (libraryName == "debug")
-      {
+      } else if (libraryName == "debug") {
         libType = DEBUG_LibraryType;
         ++j;
         libraryName = *j;
@@ -1837,8 +1833,8 @@ cmTarget* cmMakefile::AddLibrary(const std::string& lname,
                                  bool excludeFromAll)
 {
   assert(type == cmState::STATIC_LIBRARY || type == cmState::SHARED_LIBRARY ||
-      type == cmState::MODULE_LIBRARY || type == cmState::OBJECT_LIBRARY ||
-      type == cmState::INTERFACE_LIBRARY);
+         type == cmState::MODULE_LIBRARY || type == cmState::OBJECT_LIBRARY ||
+         type == cmState::INTERFACE_LIBRARY);
 
   cmTarget* target = this->AddNewTarget(type, lname);
   // Clear its dependencies. Otherwise, dependencies might persist
@@ -2087,29 +2083,26 @@ void cmMakefile::ExpandVariablesCMP0019()
     for (std::vector<std::string>::iterator l = linkLibs.begin();
          l != linkLibs.end(); ++l) {
       std::string libName = *l;
-      if (libName == "optimized")
-      {
+      if (libName == "optimized") {
         ++l;
         libName = *l;
-      } else
-      if (libName == "debug")
-      {
+      } else if (libName == "debug") {
         ++l;
         libName = *l;
       }
-    if (mightExpandVariablesCMP0019(libName.c_str())) {
-      std::string orig = libName;
-      this->ExpandVariablesInString(libName, true, true);
-      if (pol == cmPolicies::WARN && libName != orig) {
-        /* clang-format off */
+      if (mightExpandVariablesCMP0019(libName.c_str())) {
+        std::string orig = libName;
+        this->ExpandVariablesInString(libName, true, true);
+        if (pol == cmPolicies::WARN && libName != orig) {
+          /* clang-format off */
         w << "Evaluated link library\n"
           << "  " << orig << "\n"
           << "as\n"
           << "  " << libName << "\n";
-        /* clang-format on */
+          /* clang-format on */
+        }
       }
     }
-    }
   }
 
   if (!w.str().empty()) {

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

Summary of changes:
 Source/cmCPluginAPI.cxx |   31 ++++++++++++++-----------------
 Source/cmMakefile.cxx   |   35 ++++++++++++++---------------------
 2 files changed, 28 insertions(+), 38 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list