[Cmake-commits] CMake branch, next, updated. v2.8.2-409-g632c265

Brad King brad.king at kitware.com
Wed Aug 11 16:18:30 EDT 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  632c26590ff93aa10bc46e41ba4dcae870cbad17 (commit)
       via  31a313d47043923bc722554175912e75a03a13f6 (commit)
      from  299f3246587609cb48da136eac8b183d3af835b6 (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=632c26590ff93aa10bc46e41ba4dcae870cbad17
commit 632c26590ff93aa10bc46e41ba4dcae870cbad17
Merge: 299f324 31a313d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 11 16:18:26 2010 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 11 16:18:26 2010 -0400

    Merge topic 'CPack-APIredesign' into next
    
    31a313d CPack: Avoid member shadowing after API refactor


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31a313d47043923bc722554175912e75a03a13f6
commit 31a313d47043923bc722554175912e75a03a13f6
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 11 16:17:09 2010 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Aug 11 16:17:09 2010 -0400

    CPack: Avoid member shadowing after API refactor
    
    After converting method arguments to members we need to avoid use of the
    same names as local variables and other method arguments.

diff --git a/Source/CPack/cmCPackBundleGenerator.cxx b/Source/CPack/cmCPackBundleGenerator.cxx
index a9d283a..06a0509 100644
--- a/Source/CPack/cmCPackBundleGenerator.cxx
+++ b/Source/CPack/cmCPackBundleGenerator.cxx
@@ -165,5 +165,5 @@ int cmCPackBundleGenerator::PackageFiles()
     cmSystemTools::SetPermissions(command_target.str().c_str(), 0777);
     }
 
-  return this->CreateDMG(toplevel.c_str(), packageFileNames[0].c_str());
+  return this->CreateDMG();
 }
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index e12c98c..e9ce76c 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -107,7 +107,7 @@ const char* cmCPackDragNDropGenerator::GetOutputExtension()
 int cmCPackDragNDropGenerator::PackageFiles()
 {
 
-  return this->CreateDMG(toplevel, packageFileNames[0]);
+  return this->CreateDMG();
 }
 
 //----------------------------------------------------------------------
@@ -159,8 +159,7 @@ bool cmCPackDragNDropGenerator::RunCommand(cmOStringStream& command,
 }
 
 //----------------------------------------------------------------------
-int cmCPackDragNDropGenerator::CreateDMG(const std::string& toplevel,
-  const std::string& outFileName)
+int cmCPackDragNDropGenerator::CreateDMG()
 {
   // Get optional arguments ...
   const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON") 
@@ -473,7 +472,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& toplevel,
   final_image_command << cpack_dmg_format;
   final_image_command << " -imagekey";
   final_image_command << " zlib-level=9";
-  final_image_command << " -o \"" << outFileName << "\"";
+  final_image_command << " -o \"" << packageFileNames[0] << "\"";
   
   if(!this->RunCommand(final_image_command))
     {
diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h
index 8a4d774..dcef7fb 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.h
+++ b/Source/CPack/cmCPackDragNDropGenerator.h
@@ -34,8 +34,7 @@ protected:
   bool CopyFile(cmOStringStream& source, cmOStringStream& target);
   bool RunCommand(cmOStringStream& command, std::string* output = 0);
 
-  virtual int CreateDMG(const std::string& installdir,
-    const std::string& outdmg);
+  int CreateDMG();
 
   std::string InstallPrefix;
 };
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index b59e980..37b8d5a 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -331,13 +331,13 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
       {
       cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl);
       cmsys::Glob gl;
-      std::string toplevel = it->c_str();
+      std::string top = it->c_str();
       it ++;
       std::string subdir = it->c_str();
-      std::string findExpr = toplevel;
+      std::string findExpr = top;
       findExpr += "/*";
       cmCPackLogger(cmCPackLog::LOG_OUTPUT,
-        "- Install directory: " << toplevel << std::endl);
+        "- Install directory: " << top << std::endl);
       gl.RecurseOn();
       if ( !gl.FindFiles(findExpr) )
         {
@@ -369,7 +369,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
           }
         std::string filePath = tempDir;
         filePath += "/" + subdir + "/"
-          + cmSystemTools::RelativePath(toplevel.c_str(), gfit->c_str());
+          + cmSystemTools::RelativePath(top.c_str(), gfit->c_str());
         cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy file: "
           << inFile.c_str() << " -> " << filePath.c_str() << std::endl);
         if ( !cmSystemTools::CopyFileIfDifferent(inFile.c_str(),

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

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


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list