[Cmake-commits] CMake branch, next, updated. v2.8.8-3444-gf76ffa9

Brad King brad.king at kitware.com
Wed Jul 11 15:38:05 EDT 2012


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  f76ffa923d4bc460b0876e5a325ed0ca73882d5c (commit)
       via  8720aa0496bad1381a6636a3c4a6d5d550381960 (commit)
      from  ba91a131ae1ab771f66e8d314eefad0b49ee27b1 (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=f76ffa923d4bc460b0876e5a325ed0ca73882d5c
commit f76ffa923d4bc460b0876e5a325ed0ca73882d5c
Merge: ba91a13 8720aa0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jul 11 15:38:03 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jul 11 15:38:03 2012 -0400

    Merge topic 'fix-install-COMPONENT-option' into next
    
    8720aa0 install: Fix COMPONENT option


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8720aa0496bad1381a6636a3c4a6d5d550381960
commit 8720aa0496bad1381a6636a3c4a6d5d550381960
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jul 11 15:03:21 2012 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jul 11 15:10:40 2012 -0400

    install: Fix COMPONENT option
    
    Since commit 7ced0732 (make default install component name configurable,
    2012-05-13) the COMPONENT option has not worked in all cases.  The
    change restored use of the broken SetDefaultString previously removed by
    commit 43cad3e4 (fix the default "Unspecified" component, 2008-03-26).
    
    Remove SetDefaultString and use the default component name only when an
    invocation does not specify a non-empty COMPONENT option value.
    
    Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680825

diff --git a/Source/cmCommandArgumentsHelper.cxx b/Source/cmCommandArgumentsHelper.cxx
index 1c906a6..d920137 100644
--- a/Source/cmCommandArgumentsHelper.cxx
+++ b/Source/cmCommandArgumentsHelper.cxx
@@ -178,7 +178,7 @@ bool cmCAString::DoConsume(const std::string& arg, unsigned int index)
 
 void cmCAString::DoReset()
 {
-  this->String = this->DefaultString;
+  this->String = "";
 }
 
 cmCAEnabler::cmCAEnabler(cmCommandArgumentsHelper* args, 
diff --git a/Source/cmCommandArgumentsHelper.h b/Source/cmCommandArgumentsHelper.h
index cb33ccd..3b0b058 100644
--- a/Source/cmCommandArgumentsHelper.h
+++ b/Source/cmCommandArgumentsHelper.h
@@ -125,11 +125,8 @@ class cmCAString : public cmCommandArgument
     /// Return the string
     const std::string& GetString() const                 {return this->String;}
     const char* GetCString() const               {return this->String.c_str();}
-    void SetDefaultString(const char* text)
-                                    {this->DefaultString = (text ? text : "");}
   private:
     std::string String;
-    std::string DefaultString;
     unsigned int DataStart;
     virtual bool DoConsume(const std::string& arg, unsigned int index);
     virtual void DoReset();
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx
index 0ba21c7..8e48f08 100644
--- a/Source/cmInstallCommandArguments.cxx
+++ b/Source/cmInstallCommandArguments.cxx
@@ -36,8 +36,8 @@ cmInstallCommandArguments::cmInstallCommandArguments(
 ,NamelinkOnly  (&Parser, "NAMELINK_ONLY" , &ArgumentGroup)
 ,NamelinkSkip  (&Parser, "NAMELINK_SKIP" , &ArgumentGroup)
 ,GenericArguments(0)
+,DefaultComponentName(defaultComponent)
 {
-  this->Component.SetDefaultString(defaultComponent.c_str());
 }
 
 const std::string& cmInstallCommandArguments::GetDestination() const
@@ -63,7 +63,10 @@ const std::string& cmInstallCommandArguments::GetComponent() const
     {
     return this->GenericArguments->GetComponent();
     }
-
+  if (!this->DefaultComponentName.empty())
+    {
+    return this->DefaultComponentName;
+    }
   static std::string unspecifiedComponent = "Unspecified";
   return unspecifiedComponent;
 }
diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h
index 321454a..01f7d56 100644
--- a/Source/cmInstallCommandArguments.h
+++ b/Source/cmInstallCommandArguments.h
@@ -61,6 +61,7 @@ class cmInstallCommandArguments
     cmInstallCommandArguments* GenericArguments;
     static const char* PermissionsTable[];
     static const std::string EmptyString;
+    std::string DefaultComponentName;
     bool CheckPermissions();
 };
 

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

Summary of changes:
 Source/cmCommandArgumentsHelper.cxx  |    2 +-
 Source/cmCommandArgumentsHelper.h    |    3 ---
 Source/cmInstallCommandArguments.cxx |    7 +++++--
 Source/cmInstallCommandArguments.h   |    1 +
 4 files changed, 7 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list