[Cmake-commits] CMake branch, next, updated. v3.7.2-2544-g8c3b29c

Brad King brad.king at kitware.com
Sat Feb 4 08:07:09 EST 2017


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  8c3b29c2afeb30fcf54e2c0025d4663515f904cb (commit)
       via  8509e8b14ead75ebcbedf0fa839bc733b1a39f4f (commit)
      from  bc0eaa247812088f98bb77230a6c334125ff7a99 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c3b29c2afeb30fcf54e2c0025d4663515f904cb
commit 8c3b29c2afeb30fcf54e2c0025d4663515f904cb
Merge: bc0eaa2 8509e8b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Feb 4 08:07:08 2017 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Feb 4 08:07:08 2017 -0500

    Merge topic 'productbuild_signing' into next
    
    8509e8b1 CPackProductBuild: Fix compilation


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8509e8b14ead75ebcbedf0fa839bc733b1a39f4f
commit 8509e8b14ead75ebcbedf0fa839bc733b1a39f4f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Feb 4 08:04:19 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Sat Feb 4 08:06:10 2017 -0500

    CPackProductBuild: Fix compilation

diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx
index 07b539d..a5a18dc 100644
--- a/Source/CPack/cmCPackProductBuildGenerator.cxx
+++ b/Source/CPack/cmCPackProductBuildGenerator.cxx
@@ -75,10 +75,14 @@ int cmCPackProductBuildGenerator::PackageFiles()
 
   std::string version = this->GetOption("CPACK_PACKAGE_VERSION");
   std::string productbuild = this->GetOption("CPACK_COMMAND_PRODUCTBUILD");
-  const char* identityName =
-    this->GetOption("CPACK_PRODUCTBUILD_IDENTITY_NAME");
-  const char* keychainPath =
-    this->GetOption("CPACK_PRODUCTBUILD_KEYCHAIN_PATH");
+  std::string identityName;
+  if (const char* n = this->GetOption("CPACK_PRODUCTBUILD_IDENTITY_NAME")) {
+    identityName = n;
+  }
+  std::string keychainPath;
+  if (const char* p = this->GetOption("CPACK_PRODUCTBUILD_KEYCHAIN_PATH")) {
+    keychainPath = p;
+  }
 
   pkgCmd << productbuild << " --distribution \"" << packageDirFileName
          << "/Contents/distribution.dist\""
@@ -86,8 +90,9 @@ int cmCPackProductBuildGenerator::PackageFiles()
          << "\""
          << " --resources \"" << resDir << "\""
          << " --version \"" << version << "\""
-         << (identityName ? " --sign \"" + identityName + "\"" : "")
-         << (keychainPath ? " --keychain \"" + keychainPath + "\"" : "")
+         << (identityName.empty() ? "" : " --sign \"" + identityName + "\"")
+         << (keychainPath.empty() ? ""
+                                  : " --keychain \"" + keychainPath + "\"")
          << " \"" << packageFileNames[0] << "\"";
 
   // Run ProductBuild
@@ -199,16 +204,23 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
 
   std::string version = this->GetOption("CPACK_PACKAGE_VERSION");
   std::string pkgbuild = this->GetOption("CPACK_COMMAND_PKGBUILD");
-  const char* identityName = this->GetOption("CPACK_PKGBUILD_IDENTITY_NAME");
-  const char* keychainPath = this->GetOption("CPACK_PKGBUILD_KEYCHAIN_PATH");
+  std::string identityName;
+  if (const char* n = this->GetOption("CPACK_PKGBUILD_IDENTITY_NAME")) {
+    identityName = n;
+  }
+  std::string keychainPath;
+  if (const char* p = this->GetOption("CPACK_PKGBUILD_KEYCHAIN_PATH")) {
+    keychainPath = p;
+  }
 
   pkgCmd << pkgbuild << " --root \"" << packageDir << "\""
          << " --identifier \"" << pkgId << "\""
          << " --scripts \"" << scriptDir << "\""
          << " --version \"" << version << "\""
          << " --install-location \"/\""
-         << (identityName ? " --sign \"" + identityName + "\"" : "")
-         << (keychainPath ? " --keychain \"" + keychainPath + "\"" : "")
+         << (identityName.empty() ? "" : " --sign \"" + identityName + "\"")
+         << (keychainPath.empty() ? ""
+                                  : " --keychain \"" + keychainPath + "\"")
          << " \"" << packageFile << "\"";
 
   // Run ProductBuild

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

Summary of changes:
 Source/CPack/cmCPackProductBuildGenerator.cxx |   32 +++++++++++++++++--------
 1 file changed, 22 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list