summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-07 13:10:41 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-07 13:10:41 (GMT)
commit36e07e10176866c2ad07a58fd3ac30de81e0909d (patch)
tree3a80f74f0b79e4c3e0583a3f80c7d2bfcaafc30c
parent5553e330dc2015ec5b9f8e6573d9b58928bcb9e3 (diff)
parentf53b01ff0fdead346f3f63310d4a7359db269fb4 (diff)
downloadCMake-36e07e10176866c2ad07a58fd3ac30de81e0909d.zip
CMake-36e07e10176866c2ad07a58fd3ac30de81e0909d.tar.gz
CMake-36e07e10176866c2ad07a58fd3ac30de81e0909d.tar.bz2
Merge topic 'cpack-rpm-debuginfo-fixes'
f53b01ff CPack/RPM debuginfo package without binaries ca50c89e CPack/RPM debuginfo package objdump error suppression
-rw-r--r--Modules/CPackRPM.cmake68
1 files changed, 40 insertions, 28 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 3bbaae9..15b62c7 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -1427,7 +1427,8 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR)
execute_process(COMMAND "${OBJDUMP_EXECUTABLE}" -h ${WORKING_DIR}/${F}
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}"
RESULT_VARIABLE OBJDUMP_EXEC_RESULT
- OUTPUT_VARIABLE OBJDUMP_OUT)
+ OUTPUT_VARIABLE OBJDUMP_OUT
+ ERROR_QUIET)
# Check that if the given file was executable or not
if(NOT OBJDUMP_EXEC_RESULT)
string(FIND "${OBJDUMP_OUT}" "debug" FIND_RESULT)
@@ -1476,16 +1477,22 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR)
endif()
endforeach()
- list(REMOVE_DUPLICATES mkdir_list_)
- unset(TMP_RPM_DEBUGINFO_INSTALL)
- foreach(part_ IN LISTS mkdir_list_)
- string(APPEND TMP_RPM_DEBUGINFO_INSTALL "mkdir -p \"${part_}\"\n")
- endforeach()
+ list(LENGTH mkdir_list_ len_)
+ if(len_)
+ list(REMOVE_DUPLICATES mkdir_list_)
+ unset(TMP_RPM_DEBUGINFO_INSTALL)
+ foreach(part_ IN LISTS mkdir_list_)
+ string(APPEND TMP_RPM_DEBUGINFO_INSTALL "mkdir -p \"${part_}\"\n")
+ endforeach()
+ endif()
- list(REMOVE_DUPLICATES cp_list_)
- foreach(part_ IN LISTS cp_list_)
- string(APPEND TMP_RPM_DEBUGINFO_INSTALL "${part_}\n")
- endforeach()
+ list(LENGTH cp_list_ len_)
+ if(len_)
+ list(REMOVE_DUPLICATES cp_list_)
+ foreach(part_ IN LISTS cp_list_)
+ string(APPEND TMP_RPM_DEBUGINFO_INSTALL "${part_}\n")
+ endforeach()
+ endif()
if(NOT DEFINED CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS)
set(CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS /usr /usr/src /usr/src/debug)
@@ -1500,29 +1507,34 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR)
message("CPackRPM:Debug: CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS= ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}")
endif()
- list(REMOVE_DUPLICATES additional_sources_)
- unset(additional_sources_all_)
- foreach(source_ IN LISTS additional_sources_)
- string(REPLACE "/" ";" split_source_ " ${source_}")
- list(REMOVE_AT split_source_ 0)
- unset(tmp_path_)
- # Now generate all segments of the path
- foreach(segment_ IN LISTS split_source_)
- string(APPEND tmp_path_ "/${segment_}")
- list(APPEND additional_sources_all_ "${tmp_path_}")
+ list(LENGTH additional_sources_ len_)
+ if(len_)
+ list(REMOVE_DUPLICATES additional_sources_)
+ unset(additional_sources_all_)
+ foreach(source_ IN LISTS additional_sources_)
+ string(REPLACE "/" ";" split_source_ " ${source_}")
+ list(REMOVE_AT split_source_ 0)
+ unset(tmp_path_)
+ # Now generate all segments of the path
+ foreach(segment_ IN LISTS split_source_)
+ string(APPEND tmp_path_ "/${segment_}")
+ list(APPEND additional_sources_all_ "${tmp_path_}")
+ endforeach()
endforeach()
- endforeach()
- list(REMOVE_DUPLICATES additional_sources_all_)
- list(REMOVE_ITEM additional_sources_all_ ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS})
+ list(REMOVE_DUPLICATES additional_sources_all_)
+ list(REMOVE_ITEM additional_sources_all_
+ ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS})
- unset(TMP_DEBUGINFO_ADDITIONAL_SOURCES)
- foreach(source_ IN LISTS additional_sources_all_)
- string(APPEND TMP_DEBUGINFO_ADDITIONAL_SOURCES "${source_}\n")
- endforeach()
+ unset(TMP_DEBUGINFO_ADDITIONAL_SOURCES)
+ foreach(source_ IN LISTS additional_sources_all_)
+ string(APPEND TMP_DEBUGINFO_ADDITIONAL_SOURCES "${source_}\n")
+ endforeach()
+ endif()
set(TMP_RPM_DEBUGINFO_INSTALL "${TMP_RPM_DEBUGINFO_INSTALL}" PARENT_SCOPE)
- set(TMP_DEBUGINFO_ADDITIONAL_SOURCES "${TMP_DEBUGINFO_ADDITIONAL_SOURCES}" PARENT_SCOPE)
+ set(TMP_DEBUGINFO_ADDITIONAL_SOURCES "${TMP_DEBUGINFO_ADDITIONAL_SOURCES}"
+ PARENT_SCOPE)
endfunction()
function(cpack_rpm_variable_fallback OUTPUT_VAR_NAME)