diff options
author | Eric NOULARD <eric.noulard@gmail.com> | 2011-03-10 08:48:46 (GMT) |
---|---|---|
committer | Eric NOULARD <eric.noulard@gmail.com> | 2011-03-10 08:48:46 (GMT) |
commit | 564b7311f41aad0aa26a463b546bcd742aecec85 (patch) | |
tree | b3f762046bd7f457180e98444d40d60021187906 /Modules | |
parent | 8def3f59495208b44ae2b94d177c9cccd5bb1cca (diff) | |
download | CMake-564b7311f41aad0aa26a463b546bcd742aecec85.zip CMake-564b7311f41aad0aa26a463b546bcd742aecec85.tar.gz CMake-564b7311f41aad0aa26a463b546bcd742aecec85.tar.bz2 |
CPackRPM add more trace output in order to help failing diagnostics
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CPackRPM.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 026c45a..5ec7349 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -194,6 +194,25 @@ IF(NOT RPMBUILD_EXECUTABLE) MESSAGE(FATAL_ERROR "RPM package requires rpmbuild executable") ENDIF(NOT RPMBUILD_EXECUTABLE) +# Display lsb_release output if DEBUG mode enable +# This will help to diagnose problem with CPackRPM +# because we will know on which kind of Linux we are +IF(CPACK_RPM_PACKAGE_DEBUG) + find_program(LSB_RELEASE_EXECUTABLE lsb_release) + if(LSB_RELEASE_EXECUTABLE) + execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -a + OUTPUT_VARIABLE _TMP_LSB_RELEASE_OUTPUT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REGEX REPLACE "\n" ", " + LSB_RELEASE_OUTPUT + ${_TMP_LSB_RELEASE_OUTPUT}) + else (LSB_RELEASE_EXECUTABLE) + set(LSB_RELEASE_OUTPUT "lsb_release not installed/found!") + endif(LSB_RELEASE_EXECUTABLE) + MESSAGE("CPackRPM:Debug: LSB_RELEASE = ${LSB_RELEASE_OUTPUT}") +ENDIF(CPACK_RPM_PACKAGE_DEBUG) + # We may use RPM version in the future in order # to shut down warning about space in buildtree # some recent RPM version should support space in different places. |