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  fc716a5e14862935267dc71d70956a44a6954e1a (commit)
       via  deb1a0f889f464270843f9784ff2d31318b6c5c1 (commit)
      from  61f41f354b513b64040401a201fdeb834b38aa6e (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=fc716a5e14862935267dc71d70956a44a6954e1a
commit fc716a5e14862935267dc71d70956a44a6954e1a
Merge: 61f41f3 deb1a0f
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Fri Feb 20 15:24:02 2015 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Feb 20 15:24:02 2015 -0500

    Merge topic 'use-algorithms' into next
    
    deb1a0f8 Overload cmWrap.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=deb1a0f889f464270843f9784ff2d31318b6c5c1
commit deb1a0f889f464270843f9784ff2d31318b6c5c1
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Fri Feb 20 21:06:44 2015 +0100
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Fri Feb 20 21:16:52 2015 +0100

    Overload cmWrap.

diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h
index eb49041..8e642ee 100644
--- a/Source/cmAlgorithms.h
+++ b/Source/cmAlgorithms.h
@@ -289,6 +289,12 @@ std::string cmWrap(std::string prefix, Range const& r, 
std::string suffix,
   return prefix + cmJoin(r, (suffix + sep + prefix).c_str()) + suffix;
 }
 
+template<typename Range>
+std::string cmWrap(char prefix, Range const& r, char suffix, std::string sep)
+{
+  return cmWrap(std::string(1, prefix), r, std::string(1, suffix), sep);
+}
+
 
 template<typename Range, typename T>
 typename Range::const_iterator cmFindNot(Range const& r, T const& t)
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3baffd3..6147009 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2295,15 +2295,8 @@ void 
cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
       std::ostringstream ostr;
       if (!componentsSet->empty())
         {
-        ostr << "Available install components are:";
-        std::set<std::string>::iterator it;
-        for (
-          it = componentsSet->begin();
-          it != componentsSet->end();
-          ++ it )
-          {
-          ostr << " \"" << *it << "\"";
-          }
+        ostr << "Available install components are: ";
+        ostr << cmWrap('"', *componentsSet, '"', " ");
         }
       else
         {
@@ -3043,7 +3036,7 @@ void cmGlobalGenerator::ProcessEvaluationFiles()
     if (!intersection.empty())
       {
       cmSystemTools::Error("Files to be generated by multiple different "
-        "commands: ", cmWrap("\"", intersection, "\"", " ").c_str());
+        "commands: ", cmWrap('"', intersection, '"', " ").c_str());
       return;
       }
 
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 813e97d..3c92fca 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -213,7 +213,7 @@ cmMakefile::~cmMakefile()
 void cmMakefile::PrintStringVector(const char* s,
                                    const std::vector<std::string>& v) const
 {
-  std::cout << s << ": ( \n" << cmWrap("\"", v, "\"", " ") << ")\n";
+  std::cout << s << ": ( \n" << cmWrap('"', v, '"', " ") << ")\n";
 }
 
 void cmMakefile
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index bc5be33..5264123 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -835,7 +835,7 @@ cmSystemTools::PrintSingleCommand(std::vector<std::string> 
const& command)
     return std::string();
     }
 
-  return cmWrap("\"", command, "\"", " ");
+  return cmWrap('"', command, '"', " ");
 }
 
 bool cmSystemTools::DoesFileExistWithExtensions(
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 37f9a8f..7d67bd8 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -450,7 +450,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& 
args)
         return 1;
         }
 
-      std::string command = cmWrap("\"", cmRange(args).advance(3), "\"", " ");
+      std::string command = cmWrap('"', cmRange(args).advance(3), '"', " ");
       int retval = 0;
       int timeout = 0;
       if ( cmSystemTools::RunSingleCommand(command.c_str(), 0, &retval,

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

Summary of changes:
 Source/cmAlgorithms.h        |    6 ++++++
 Source/cmGlobalGenerator.cxx |   13 +++----------
 Source/cmMakefile.cxx        |    2 +-
 Source/cmSystemTools.cxx     |    2 +-
 Source/cmcmd.cxx             |    2 +-
 5 files changed, 12 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to