[Cmake-commits] CMake branch, next, updated. v2.8.3-814-g25546df

Eric Noulard eric.noulard at gmail.com
Sun Dec 12 07:05:15 EST 2010


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  25546df6c7a0f5120b2dcc2af99b4ddcbf6dbf71 (commit)
       via  6d94ea3692c5dd3aafaf8183e31f6060ca2a4669 (commit)
      from  bc94eccac2f2d5adf4c154d90ebe64bdafc39b83 (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=25546df6c7a0f5120b2dcc2af99b4ddcbf6dbf71
commit 25546df6c7a0f5120b2dcc2af99b4ddcbf6dbf71
Merge: bc94ecc 6d94ea3
Author:     Eric Noulard <eric.noulard at gmail.com>
AuthorDate: Sun Dec 12 07:05:07 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Dec 12 07:05:07 2010 -0500

    Merge topic 'CPack-MoreComponentControls' into next
    
    6d94ea3 CPack  use IsOn when it's better than IsSet


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d94ea3692c5dd3aafaf8183e31f6060ca2a4669
commit 6d94ea3692c5dd3aafaf8183e31f6060ca2a4669
Author:     Eric NOULARD <eric.noulard at gmail.com>
AuthorDate: Sun Dec 12 12:55:02 2010 +0100
Commit:     Eric NOULARD <eric.noulard at gmail.com>
CommitDate: Sun Dec 12 12:55:02 2010 +0100

    CPack  use IsOn when it's better than IsSet
    
    This authorize more control because one can set
    CPACK_ARCHIVE_COMPONENT_INSTALL to ON globally
    and then set it selectively to OFF inside
    a CPack project config file.
    Sidenote: GetOption ought to be a 'const' method.

diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index ded329d..46be99b 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -285,7 +285,7 @@ bool cmCPackArchiveGenerator::SupportsComponentInstallation() const {
   // The Component installation support should only
   // be activated if explicitly requested by the user
   // (for backward compatibility reason)
-  if (IsSet("CPACK_ARCHIVE_COMPONENT_INSTALL"))
+  if (IsOn("CPACK_ARCHIVE_COMPONENT_INSTALL"))
     {
     return true;
     }
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 92e5b6a..4ac5867 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -1063,7 +1063,13 @@ bool cmCPackGenerator::IsSet(const char* name) const
 }
 
 //----------------------------------------------------------------------
-const char* cmCPackGenerator::GetOption(const char* op)
+bool cmCPackGenerator::IsOn(const char* name) const
+{
+  return cmSystemTools::IsOn(GetOption(name));
+}
+
+//----------------------------------------------------------------------
+const char* cmCPackGenerator::GetOption(const char* op) const
 { 
   const char* ret = this->MakefileMap->GetDefinition(op);
   if(!ret)
diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h
index c450763..f44a334 100644
--- a/Source/CPack/cmCPackGenerator.h
+++ b/Source/CPack/cmCPackGenerator.h
@@ -88,8 +88,9 @@ public:
   //! Set and get the options
   void SetOption(const char* op, const char* value);
   void SetOptionIfNotSet(const char* op, const char* value);
-  const char* GetOption(const char* op);
+  const char* GetOption(const char* op) const;
   bool IsSet(const char* name) const;
+  bool IsOn(const char* name) const;
 
   //! Set all the variables
   int SetCMakeRoot();
diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx
index 34e93d3..a5db78f 100644
--- a/Source/CPack/cmCPackRPMGenerator.cxx
+++ b/Source/CPack/cmCPackRPMGenerator.cxx
@@ -108,7 +108,7 @@ int cmCPackRPMGenerator::PackageFiles()
 
 bool cmCPackRPMGenerator::SupportsComponentInstallation() const
   {
-  if (IsSet("CPACK_RPM_COMPONENT_INSTALL"))
+  if (IsOn("CPACK_RPM_COMPONENT_INSTALL"))
     {
       return true;
     }

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

Summary of changes:
 Source/CPack/cmCPackArchiveGenerator.cxx |    2 +-
 Source/CPack/cmCPackGenerator.cxx        |    8 +++++++-
 Source/CPack/cmCPackGenerator.h          |    3 ++-
 Source/CPack/cmCPackRPMGenerator.cxx     |    2 +-
 4 files changed, 11 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list