[Cmake-commits] CMake branch, next, updated. v3.0.0-rc3-1785-g0db2409

Brad King brad.king at kitware.com
Thu Apr 3 09:37:44 EDT 2014


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  0db2409e341e88e62e3844c6d3ed3a730f6bf476 (commit)
       via  23b4abb26082fbaec523ad48f4be54f55c11b58c (commit)
       via  eccc425af6ffeb52963cc2dd94a36a24c271108b (commit)
      from  a7052bc37ab6215e8be30074424027d087c1b07c (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=0db2409e341e88e62e3844c6d3ed3a730f6bf476
commit 0db2409e341e88e62e3844c6d3ed3a730f6bf476
Merge: a7052bc 23b4abb
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 3 09:37:43 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Apr 3 09:37:43 2014 -0400

    Merge topic 'update-kwsys' into next
    
    23b4abb2 Merge branch 'upstream-kwsys' into update-kwsys
    eccc425a KWSys 2014-04-02 (39f98b5d)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23b4abb26082fbaec523ad48f4be54f55c11b58c
commit 23b4abb26082fbaec523ad48f4be54f55c11b58c
Merge: 9f69a34 eccc425
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 3 08:43:51 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Apr 3 08:43:51 2014 -0400

    Merge branch 'upstream-kwsys' into update-kwsys


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eccc425af6ffeb52963cc2dd94a36a24c271108b
commit eccc425af6ffeb52963cc2dd94a36a24c271108b
Author:     KWSys Robot <kwrobot at kitware.com>
AuthorDate: Wed Apr 2 09:08:42 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Apr 3 08:43:46 2014 -0400

    KWSys 2014-04-02 (39f98b5d)
    
    Extract upstream KWSys using the following shell commands.
    
    $ git archive --prefix=upstream-kwsys/ 39f98b5d | tar x
    $ git shortlog --no-merges --abbrev=8 --format='%h %s' a8aa1014..39f98b5d
    Brad King (1):
          39f98b5d Encoding: Add self-assignment check to CommandLineArguments
    
    Jiri Malak (1):
          36982798 SystemTools: add Watcom single Quote processing
    
    Change-Id: Ib8e67dc0c29ee62e6489c068987e4206fa4adaf3

diff --git a/EncodingCXX.cxx b/EncodingCXX.cxx
index f76deb5..251a56d 100644
--- a/EncodingCXX.cxx
+++ b/EncodingCXX.cxx
@@ -110,16 +110,19 @@ Encoding::CommandLineArguments::
 Encoding::CommandLineArguments&
 Encoding::CommandLineArguments::operator=(const CommandLineArguments& other)
 {
-  size_t i;
-  for(i=0; i<this->argv_.size(); i++)
+  if(this != &other)
     {
-    free(this->argv_[i]);
-    }
+    size_t i;
+    for(i=0; i<this->argv_.size(); i++)
+      {
+      free(this->argv_[i]);
+      }
 
-  this->argv_.resize(other.argv_.size());
-  for(i=0; i<this->argv_.size(); i++)
-    {
-    this->argv_[i] = other.argv_[i] ? strdup(other.argv_[i]) : 0;
+    this->argv_.resize(other.argv_.size());
+    for(i=0; i<this->argv_.size(); i++)
+      {
+      this->argv_[i] = other.argv_[i] ? strdup(other.argv_[i]) : 0;
+      }
     }
 
   return *this;
diff --git a/System.c b/System.c
index 5d178bf..1ee26fa 100644
--- a/System.c
+++ b/System.c
@@ -353,6 +353,10 @@ static int kwsysSystem_Shell__GetArgumentSize(const char* in,
   if(kwsysSystem_Shell__ArgumentNeedsQuotes(in, isUnix, flags))
     {
     /* Surrounding quotes are needed.  Allocate space for them.  */
+    if((flags & kwsysSystem_Shell_Flag_WatcomQuote) && (isUnix))
+      {
+        size += 2;
+      }
     size += 2;
 
     /* We must escape all ending backslashes when quoting on windows.  */
@@ -377,7 +381,18 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out,
   if(needQuotes)
     {
     /* Add the opening quote for this argument.  */
-    *out++ = '"';
+    if(flags & kwsysSystem_Shell_Flag_WatcomQuote)
+      {
+      if(isUnix)
+        {
+        *out++ = '"';
+        }
+      *out++ = '\'';
+      }
+    else
+      {
+      *out++ = '"';
+      }
     }
 
   /* Scan the string for characters that require escaping or quoting.  */
@@ -549,7 +564,18 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out,
       }
 
     /* Add the closing quote for this argument.  */
-    *out++ = '"';
+    if(flags & kwsysSystem_Shell_Flag_WatcomQuote)
+      {
+      *out++ = '\'';
+      if(isUnix)
+        {
+        *out++ = '"';
+        }
+      }
+    else
+      {
+      *out++ = '"';
+      }
     }
 
   /* Store a terminating null without incrementing.  */
diff --git a/System.h.in b/System.h.in
index 549db90..f21bf0d 100644
--- a/System.h.in
+++ b/System.h.in
@@ -36,6 +36,7 @@
 # define kwsysSystem_Shell_Flag_MinGWMake             kwsys_ns(System_Shell_Flag_MinGWMake)
 # define kwsysSystem_Shell_Flag_NMake                 kwsys_ns(System_Shell_Flag_NMake)
 # define kwsysSystem_Shell_Flag_AllowMakeVariables    kwsys_ns(System_Shell_Flag_AllowMakeVariables)
+# define kwsysSystem_Shell_Flag_WatcomQuote           kwsys_ns(System_Shell_Flag_WatcomQuote)
 #endif
 
 #ifdef __VMS
@@ -102,14 +103,17 @@ enum kwsysSystem_Shell_Flag_e
   kwsysSystem_Shell_Flag_MinGWMake          = (1<<4),
 
   /** The target shell is in a NMake makefile.  */
-  kwsysSystem_Shell_Flag_NMake              = (1<<6),
+  kwsysSystem_Shell_Flag_NMake              = (1<<5),
 
   /** Make variable reference syntax $(MAKEVAR) should not be escaped
       to allow a build tool to replace it.  Replacement values
       containing spaces, quotes, backslashes, or other
       non-alphanumeric characters that have significance to some makes
       or shells produce undefined behavior.  */
-  kwsysSystem_Shell_Flag_AllowMakeVariables = (1<<5)
+  kwsysSystem_Shell_Flag_AllowMakeVariables = (1<<6),
+
+  /** The target shell quoting uses extra single Quotes for Watcom tools.  */
+  kwsysSystem_Shell_Flag_WatcomQuote        = (1<<7)
 };
 
 /**
@@ -156,6 +160,7 @@ kwsysEXPORT char** kwsysSystem_Parse_CommandForUnix(const char* command,
 #  undef kwsysSystem_Shell_Flag_MinGWMake
 #  undef kwsysSystem_Shell_Flag_NMake
 #  undef kwsysSystem_Shell_Flag_AllowMakeVariables
+#  undef kwsysSystem_Shell_Flag_WatcomQuote
 # endif
 #endif
 

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

Summary of changes:
 Source/kwsys/EncodingCXX.cxx |   19 +++++++++++--------
 Source/kwsys/System.c        |   30 ++++++++++++++++++++++++++++--
 Source/kwsys/System.h.in     |    9 +++++++--
 3 files changed, 46 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list