summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2011-03-10 17:20:16 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2011-03-10 17:20:16 (GMT)
commit0e07b425cad4b608e44846a08ba9ee4ae05828d5 (patch)
treeba89a99b313a7fea6432dc6997bbe1aceaabc0db
parent564b7311f41aad0aa26a463b546bcd742aecec85 (diff)
downloadCMake-0e07b425cad4b608e44846a08ba9ee4ae05828d5.zip
CMake-0e07b425cad4b608e44846a08ba9ee4ae05828d5.tar.gz
CMake-0e07b425cad4b608e44846a08ba9ee4ae05828d5.tar.bz2
CPackRPM even more trace in debug mode or in case of failure
-rw-r--r--Modules/CPackRPM.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 5ec7349..255ad9a 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -640,12 +640,17 @@ IF(RPMBUILD_EXECUTABLE)
--buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
"${CPACK_RPM_BINARY_SPECFILE}"
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
+ RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT
ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err"
OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
- IF(CPACK_RPM_PACKAGE_DEBUG)
+ IF(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
+ FILE(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err RPMBUILDERR)
+ FILE(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out RPMBUILDOUT)
MESSAGE("CPackRPM:Debug: You may consult rpmbuild logs in: ")
MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err")
+ MESSAGE("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
+ MESSAGE("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
ELSE(RPMBUILD_EXECUTABLE)
IF(ALIEN_EXECUTABLE)