[Cmake-commits] CMake branch, next, updated. v3.1.2-1094-ged2953e

Stephen Kelly steveire at gmail.com
Fri Feb 6 13:04:31 EST 2015


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  ed2953e57b017f3bbfb189658c98a34dd44d9993 (commit)
       via  d8639733a42149ca1402dcae427f2142ab0cf037 (commit)
       via  803317aab622e4f12e7d342be5bbb4f16b088efd (commit)
       via  11093a03e064e1b7ef2d5db28845b5da7b934806 (commit)
       via  6cd2ee9524e501a4ef9dc481b469b91f8f022dc9 (commit)
       via  94e993a0c170cf84da9ddb026dfec9d8d99304e0 (commit)
       via  69dbe51b08bd6b4564d031d78034633f55ed4593 (commit)
       via  683fafea088c26658283da3bdf05277aaa1a3cee (commit)
       via  63f584b618b3381ad93c901f691191acd48329a7 (commit)
       via  74c4d9d27aece9a619eaab330ad23cf4b0de2b19 (commit)
       via  71d47115d009983665d6db4b25ea0ef40464f365 (commit)
       via  39622c995c189b4e22dfdc0e9aa29c8fce5eac17 (commit)
       via  a7fcc148bdfa5e9f2c6901b0de8192f5aa043741 (commit)
       via  d46c4f0727acb35963dfda579cd5c9efd63aab01 (commit)
       via  d59913f001b6eb74f9baf8bad183dc83d5e7bcd1 (commit)
      from  f72dfcb7ccca2d134aa456eb771aee7178bd5675 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed2953e57b017f3bbfb189658c98a34dd44d9993
commit ed2953e57b017f3bbfb189658c98a34dd44d9993
Merge: f72dfcb d863973
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Feb 6 13:04:29 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 6 13:04:29 2015 -0500

    Merge topic 'use-algorithms' into next
    
    d8639733 cmSystemTools: Remove unnecessary comparison.
    803317aa cmSystemTools: Early return if size makes later comparison false.
    11093a03 Replace temporary bool by inlining warning condition.
    6cd2ee95 Replace loop with member algorithm.
    94e993a0 cmComputeLinkDepends: Remove temporary iterator copy.
    69dbe51b Replace loop with algorithm.
    683fafea Replace a loop with std::transform.
    63f584b6 Replace while loop with member insert.
    74c4d9d2 Take a size check outside of an inner loop.
    71d47115 Use insert member instead of back_inserter.
    39622c99 Convert while loop to member insert.
    a7fcc148 Convert loop to algorithm.
    d46c4f07 Extract a prefix variable from loop.
    d59913f0 Take computation out of loop.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d8639733a42149ca1402dcae427f2142ab0cf037
commit d8639733a42149ca1402dcae427f2142ab0cf037
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 27 23:52:50 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:10 2015 +0100

    cmSystemTools: Remove unnecessary comparison.
    
    We already know the string is uppercase.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index bb007ef..d3ab36b 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -376,7 +376,7 @@ bool cmSystemTools::IsInternallyOn(const char* val)
     {
     *c = static_cast<char>(toupper(*c));
     }
-  return (v == "I_ON" || v == "i_on");
+  return v == "I_ON";
 }
 
 bool cmSystemTools::IsOn(const char* val)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=803317aab622e4f12e7d342be5bbb4f16b088efd
commit 803317aab622e4f12e7d342be5bbb4f16b088efd
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 27 23:50:42 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:10 2015 +0100

    cmSystemTools: Early return if size makes later comparison false.

diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index b07dd78..bb007ef 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -366,6 +366,10 @@ bool cmSystemTools::IsInternallyOn(const char* val)
     return false;
     }
   std::basic_string<char> v = val;
+  if (v.size() > 4)
+    {
+    return false;
+    }
 
   for(std::basic_string<char>::iterator c = v.begin();
       c != v.end(); c++)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=11093a03e064e1b7ef2d5db28845b5da7b934806
commit 11093a03e064e1b7ef2d5db28845b5da7b934806
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 27 22:13:45 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:10 2015 +0100

    Replace temporary bool by inlining warning condition.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index bd9cb26..7afe05f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -3641,24 +3641,20 @@ bool cmLocalGenerator::NeedBackwardsCompatibility_2_4()
 bool cmLocalGenerator::CheckDefinition(std::string const& define) const
 {
   // Many compilers do not support -DNAME(arg)=sdf so we disable it.
-  bool function_style = false;
-
   std::string::size_type pos = define.find_first_of("(=");
   if (pos != std::string::npos)
     {
-    function_style = define[pos] == '(';
-    }
-
-  if(function_style)
-    {
-    std::ostringstream e;
-    e << "WARNING: Function-style preprocessor definitions may not be "
-      << "passed on the compiler command line because many compilers "
-      << "do not support it.\n"
-      << "CMake is dropping a preprocessor definition: " << define << "\n"
-      << "Consider defining the macro in a (configured) header file.\n";
-    cmSystemTools::Message(e.str().c_str());
-    return false;
+    if (define[pos] == '(')
+      {
+      std::ostringstream e;
+      e << "WARNING: Function-style preprocessor definitions may not be "
+        << "passed on the compiler command line because many compilers "
+        << "do not support it.\n"
+        << "CMake is dropping a preprocessor definition: " << define << "\n"
+        << "Consider defining the macro in a (configured) header file.\n";
+      cmSystemTools::Message(e.str().c_str());
+      return false;
+      }
     }
 
   // Many compilers do not support # in the value so we disable it.

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6cd2ee9524e501a4ef9dc481b469b91f8f022dc9
commit 6cd2ee9524e501a4ef9dc481b469b91f8f022dc9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 27 22:09:17 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:10 2015 +0100

    Replace loop with member algorithm.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 9109db4..bd9cb26 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -3642,14 +3642,13 @@ bool cmLocalGenerator::CheckDefinition(std::string const& define) const
 {
   // Many compilers do not support -DNAME(arg)=sdf so we disable it.
   bool function_style = false;
-  for(const char* c = define.c_str(); *c && *c != '='; ++c)
+
+  std::string::size_type pos = define.find_first_of("(=");
+  if (pos != std::string::npos)
     {
-    if(*c == '(')
-      {
-      function_style = true;
-      break;
-      }
+    function_style = define[pos] == '(';
     }
+
   if(function_style)
     {
     std::ostringstream e;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=94e993a0c170cf84da9ddb026dfec9d8d99304e0
commit 94e993a0c170cf84da9ddb026dfec9d8d99304e0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jan 27 21:34:01 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:10 2015 +0100

    cmComputeLinkDepends: Remove temporary iterator copy.

diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index fa1bbcc..8652690 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -692,8 +692,7 @@ void cmComputeLinkDepends::CleanConstraintGraph()
     std::sort(i->begin(), i->end());
 
     // Make the edge list unique.
-    EdgeList::iterator last = std::unique(i->begin(), i->end());
-    i->erase(last, i->end());
+    i->erase(std::unique(i->begin(), i->end()), i->end());
     }
 }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69dbe51b08bd6b4564d031d78034633f55ed4593
commit 69dbe51b08bd6b4564d031d78034633f55ed4593
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 25 16:02:46 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:10 2015 +0100

    Replace loop with algorithm.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ef42b38..f0bdea7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1153,15 +1153,11 @@ cmTarget::LinkLibraryType cmTarget::ComputeLinkType(
 
   // Check if any entry in the list matches this configuration.
   std::string configUpper = cmSystemTools::UpperCase(config);
-  for(std::vector<std::string>::const_iterator i = debugConfigs.begin();
-      i != debugConfigs.end(); ++i)
+  if (std::find(debugConfigs.begin(), debugConfigs.end(), configUpper) !=
+      debugConfigs.end())
     {
-    if(*i == configUpper)
-      {
-      return cmTarget::DEBUG;
-      }
+    return cmTarget::DEBUG;
     }
-
   // The current configuration is not a debug configuration.
   return cmTarget::OPTIMIZED;
 }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=683fafea088c26658283da3bdf05277aaa1a3cee
commit 683fafea088c26658283da3bdf05277aaa1a3cee
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 25 16:01:07 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:09 2015 +0100

    Replace a loop with std::transform.

diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 652e451..875dbbd 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2731,11 +2731,10 @@ std::vector<std::string> const& cmake::GetDebugConfigs()
       {
       // Expand the specified list and convert to upper-case.
       cmSystemTools::ExpandListArgument(config_list, this->DebugConfigs);
-      for(std::vector<std::string>::iterator i = this->DebugConfigs.begin();
-          i != this->DebugConfigs.end(); ++i)
-        {
-        *i = cmSystemTools::UpperCase(*i);
-        }
+      std::transform(this->DebugConfigs.begin(),
+                     this->DebugConfigs.end(),
+                     this->DebugConfigs.begin(),
+                     cmSystemTools::UpperCase);
       }
     // If no configurations were specified, use a default list.
     if(this->DebugConfigs.empty())

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63f584b618b3381ad93c901f691191acd48329a7
commit 63f584b618b3381ad93c901f691191acd48329a7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 25 15:36:59 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:09 2015 +0100

    Replace while loop with member insert.

diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx
index 9a7fab2..e41a0ca 100644
--- a/Source/cmSetTargetPropertiesCommand.cxx
+++ b/Source/cmSetTargetPropertiesCommand.cxx
@@ -40,14 +40,7 @@ bool cmSetTargetPropertiesCommand
         this->SetError("called with incorrect number of arguments.");
         return false;
         }
-      while (j != args.end())
-        {
-        propertyPairs.push_back(*j);
-        ++j;
-        propertyPairs.push_back(*j);
-        ++j;
-        }
-      // break out of the loop because j is already == end
+      propertyPairs.insert(propertyPairs.end(), j, args.end());
       break;
       }
     else if (doingFiles)
diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx
index 032c78e..d079a19 100644
--- a/Source/cmSetTestsPropertiesCommand.cxx
+++ b/Source/cmSetTestsPropertiesCommand.cxx
@@ -41,14 +41,7 @@ bool cmSetTestsPropertiesCommand
         this->SetError("called with incorrect number of arguments.");
         return false;
         }
-      while (j != args.end())
-        {
-        propertyPairs.push_back(*j);
-        ++j;
-        propertyPairs.push_back(*j);
-        ++j;
-        }
-      // break out of the loop because j is already == end
+      propertyPairs.insert(propertyPairs.end(), j, args.end());
       break;
       }
     else if (doingFiles)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74c4d9d27aece9a619eaab330ad23cf4b0de2b19
commit 74c4d9d27aece9a619eaab330ad23cf4b0de2b19
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 25 15:35:26 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:09 2015 +0100

    Take a size check outside of an inner loop.

diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx
index aeb8077..9a7fab2 100644
--- a/Source/cmSetTargetPropertiesCommand.cxx
+++ b/Source/cmSetTargetPropertiesCommand.cxx
@@ -35,15 +35,15 @@ bool cmSetTargetPropertiesCommand
       doingFiles = false;
       // now loop through the rest of the arguments, new style
       ++j;
+      if (std::distance(j, args.end()) % 2 != 0)
+        {
+        this->SetError("called with incorrect number of arguments.");
+        return false;
+        }
       while (j != args.end())
         {
         propertyPairs.push_back(*j);
         ++j;
-        if(j == args.end())
-          {
-          this->SetError("called with incorrect number of arguments.");
-          return false;
-          }
         propertyPairs.push_back(*j);
         ++j;
         }
diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx
index e66d13d..032c78e 100644
--- a/Source/cmSetTestsPropertiesCommand.cxx
+++ b/Source/cmSetTestsPropertiesCommand.cxx
@@ -36,15 +36,15 @@ bool cmSetTestsPropertiesCommand
       doingFiles = false;
       // now loop through the rest of the arguments, new style
       ++j;
+      if (std::distance(j, args.end()) % 2 != 0)
+        {
+        this->SetError("called with incorrect number of arguments.");
+        return false;
+        }
       while (j != args.end())
         {
         propertyPairs.push_back(*j);
         ++j;
-        if(j == args.end())
-          {
-          this->SetError("called with incorrect number of arguments.");
-          return false;
-          }
         propertyPairs.push_back(*j);
         ++j;
         }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71d47115d009983665d6db4b25ea0ef40464f365
commit 71d47115d009983665d6db4b25ea0ef40464f365
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 24 18:21:56 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:09 2015 +0100

    Use insert member instead of back_inserter.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 98cb75c..ef42b38 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -5919,8 +5919,7 @@ cmTarget::GetCompatibleInterfaces(std::string const& config) const
         { \
         std::vector<std::string> props; \
         cmSystemTools::ExpandListArgument(prop, props); \
-        std::copy(props.begin(), props.end(), \
-                  std::inserter(compat.Props##x, compat.Props##x.begin())); \
+        compat.Props##x.insert(props.begin(), props.end()); \
         }
       CM_READ_COMPATIBLE_INTERFACE(BOOL, Bool)
       CM_READ_COMPATIBLE_INTERFACE(STRING, String)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=39622c995c189b4e22dfdc0e9aa29c8fce5eac17
commit 39622c995c189b4e22dfdc0e9aa29c8fce5eac17
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 24 18:18:56 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:09 2015 +0100

    Convert while loop to member insert.

diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index db2f6fb..edf82bd 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -435,11 +435,7 @@ bool cmAddLibraryCommand
     cmSystemTools::Message(msg.c_str() ,"Warning");
     }
 
-  while (s != args.end())
-    {
-    srclists.push_back(*s);
-    ++s;
-    }
+  srclists.insert(srclists.end(), s, args.end());
 
   this->Makefile->AddLibrary(libName, type, srclists, excludeFromAll);
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7fcc148bdfa5e9f2c6901b0de8192f5aa043741
commit a7fcc148bdfa5e9f2c6901b0de8192f5aa043741
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 18 16:01:54 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:09 2015 +0100

    Convert loop to algorithm.

diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 9a2186b..785d0ca 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2396,10 +2396,7 @@ void cmLocalUnixMakefileGenerator3
     std::string outputForExisting =
                           this->ConvertToOutputForExisting(tgtDir, relRetDir);
     std::string prefix = cd_cmd + outputForExisting + " && ";
-    std::vector<std::string>::iterator i = commands.begin();
-    for (; i != commands.end(); ++i)
-      {
-      *i = prefix + *i;
-      }
+    std::transform(commands.begin(), commands.end(), commands.begin(),
+                   std::bind1st(std::plus<std::string>(), prefix));
     }
 }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d46c4f0727acb35963dfda579cd5c9efd63aab01
commit d46c4f0727acb35963dfda579cd5c9efd63aab01
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 25 15:07:27 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:08 2015 +0100

    Extract a prefix variable from loop.

diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 13c47c5..9a2186b 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2395,14 +2395,11 @@ void cmLocalUnixMakefileGenerator3
     // each command.
     std::string outputForExisting =
                           this->ConvertToOutputForExisting(tgtDir, relRetDir);
+    std::string prefix = cd_cmd + outputForExisting + " && ";
     std::vector<std::string>::iterator i = commands.begin();
     for (; i != commands.end(); ++i)
       {
-      std::string cmd = cd_cmd;
-      cmd += outputForExisting;
-      cmd += " && ";
-      cmd += *i;
-      *i = cmd;
+      *i = prefix + *i;
       }
     }
 }

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d59913f001b6eb74f9baf8bad183dc83d5e7bcd1
commit d59913f001b6eb74f9baf8bad183dc83d5e7bcd1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 18 15:59:03 2015 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Feb 6 19:04:08 2015 +0100

    Take computation out of loop.

diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index fbf2140..13c47c5 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2393,11 +2393,13 @@ void cmLocalUnixMakefileGenerator3
     // On UNIX we must construct a single shell command to change
     // directory and build because make resets the directory between
     // each command.
+    std::string outputForExisting =
+                          this->ConvertToOutputForExisting(tgtDir, relRetDir);
     std::vector<std::string>::iterator i = commands.begin();
     for (; i != commands.end(); ++i)
       {
       std::string cmd = cd_cmd;
-      cmd += this->ConvertToOutputForExisting(tgtDir, relRetDir);
+      cmd += outputForExisting;
       cmd += " && ";
       cmd += *i;
       *i = cmd;

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list