Hi Clint, I have another patch to tweak the error output a little bit. If codesign fails it won't be possible to get the error message of codesign itself. That is a little bit confusing because it just fails without an understandable reason.
This patch will print the output of codesign if it fails. Best regards André Klitzing 2014-10-28 19:22 GMT+01:00 Clinton Stimpson <clin...@elemtech.com>: > > Thanks for the patch. > Its in the repository now. > <http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=bd3fbf3> > > Clint >
From ad4671b3c469f3f3eb89e227b54c40cb09b25474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= <aklitz...@gmail.com> Date: Fri, 20 Feb 2015 10:45:14 +0100 Subject: [PATCH] CPack: Print output from codesign if signing fails --- Source/CPack/cmCPackBundleGenerator.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git x/Source/CPack/cmCPackBundleGenerator.cxx y/Source/CPack/cmCPackBundleGenerator.cxx index e751568..6e7a26b 100644 --- x/Source/CPack/cmCPackBundleGenerator.cxx +++ y/Source/CPack/cmCPackBundleGenerator.cxx @@ -214,6 +214,7 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir) // codesign the application. if(!cpack_apple_cert_app.empty()) { + std::string output; std::string bundle_path; bundle_path = src_dir + "/"; bundle_path += this->GetOption("CPACK_BUNDLE_NAME"); @@ -240,11 +241,11 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir) temp_sign_file_cmd << bundle_path; temp_sign_file_cmd << it->c_str() << "\""; - if(!this->RunCommand(temp_sign_file_cmd)) + if(!this->RunCommand(temp_sign_file_cmd, &output)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error signing file:" - << bundle_path << it->c_str() << std::endl); + << bundle_path << it->c_str() << std::endl << output << std::endl); return 0; } @@ -256,11 +257,11 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir) temp_sign_binary_cmd << " --deep -f -s \"" << cpack_apple_cert_app; temp_sign_binary_cmd << "\" \"" << bundle_path << "\""; - if(!this->RunCommand(temp_sign_binary_cmd)) + if(!this->RunCommand(temp_sign_binary_cmd, &output)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error signing the application binary." - << std::endl); + << std::endl << output << std::endl); return 0; } @@ -276,11 +277,11 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir) } temp_codesign_cmd << " \"" << bundle_path << "\""; - if(!this->RunCommand(temp_codesign_cmd)) + if(!this->RunCommand(temp_codesign_cmd, &output)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Error signing the application package." - << std::endl); + << std::endl << output << std::endl); return 0; } -- 2.3.0
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers