Merge branch 'cpack-rpm-debuginfo-fixes' into release
This commit is contained in:
commit
dcf9729eb9
|
@ -1427,7 +1427,8 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR)
|
||||||
execute_process(COMMAND "${OBJDUMP_EXECUTABLE}" -h ${WORKING_DIR}/${F}
|
execute_process(COMMAND "${OBJDUMP_EXECUTABLE}" -h ${WORKING_DIR}/${F}
|
||||||
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}"
|
WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}"
|
||||||
RESULT_VARIABLE OBJDUMP_EXEC_RESULT
|
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
|
# Check that if the given file was executable or not
|
||||||
if(NOT OBJDUMP_EXEC_RESULT)
|
if(NOT OBJDUMP_EXEC_RESULT)
|
||||||
string(FIND "${OBJDUMP_OUT}" "debug" FIND_RESULT)
|
string(FIND "${OBJDUMP_OUT}" "debug" FIND_RESULT)
|
||||||
|
@ -1476,16 +1477,22 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
list(LENGTH mkdir_list_ len_)
|
||||||
|
if(len_)
|
||||||
list(REMOVE_DUPLICATES mkdir_list_)
|
list(REMOVE_DUPLICATES mkdir_list_)
|
||||||
unset(TMP_RPM_DEBUGINFO_INSTALL)
|
unset(TMP_RPM_DEBUGINFO_INSTALL)
|
||||||
foreach(part_ IN LISTS mkdir_list_)
|
foreach(part_ IN LISTS mkdir_list_)
|
||||||
string(APPEND TMP_RPM_DEBUGINFO_INSTALL "mkdir -p \"${part_}\"\n")
|
string(APPEND TMP_RPM_DEBUGINFO_INSTALL "mkdir -p \"${part_}\"\n")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(LENGTH cp_list_ len_)
|
||||||
|
if(len_)
|
||||||
list(REMOVE_DUPLICATES cp_list_)
|
list(REMOVE_DUPLICATES cp_list_)
|
||||||
foreach(part_ IN LISTS cp_list_)
|
foreach(part_ IN LISTS cp_list_)
|
||||||
string(APPEND TMP_RPM_DEBUGINFO_INSTALL "${part_}\n")
|
string(APPEND TMP_RPM_DEBUGINFO_INSTALL "${part_}\n")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS)
|
if(NOT DEFINED CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS)
|
||||||
set(CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS /usr /usr/src /usr/src/debug)
|
set(CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS /usr /usr/src /usr/src/debug)
|
||||||
|
@ -1500,6 +1507,8 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR)
|
||||||
message("CPackRPM:Debug: CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS= ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}")
|
message("CPackRPM:Debug: CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS= ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
list(LENGTH additional_sources_ len_)
|
||||||
|
if(len_)
|
||||||
list(REMOVE_DUPLICATES additional_sources_)
|
list(REMOVE_DUPLICATES additional_sources_)
|
||||||
unset(additional_sources_all_)
|
unset(additional_sources_all_)
|
||||||
foreach(source_ IN LISTS additional_sources_)
|
foreach(source_ IN LISTS additional_sources_)
|
||||||
|
@ -1514,15 +1523,18 @@ function(cpack_rpm_debugsymbol_check INSTALL_FILES WORKING_DIR)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
list(REMOVE_DUPLICATES additional_sources_all_)
|
list(REMOVE_DUPLICATES additional_sources_all_)
|
||||||
list(REMOVE_ITEM additional_sources_all_ ${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS})
|
list(REMOVE_ITEM additional_sources_all_
|
||||||
|
${CPACK_RPM_DEBUGINFO_EXCLUDE_DIRS})
|
||||||
|
|
||||||
unset(TMP_DEBUGINFO_ADDITIONAL_SOURCES)
|
unset(TMP_DEBUGINFO_ADDITIONAL_SOURCES)
|
||||||
foreach(source_ IN LISTS additional_sources_all_)
|
foreach(source_ IN LISTS additional_sources_all_)
|
||||||
string(APPEND TMP_DEBUGINFO_ADDITIONAL_SOURCES "${source_}\n")
|
string(APPEND TMP_DEBUGINFO_ADDITIONAL_SOURCES "${source_}\n")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(TMP_RPM_DEBUGINFO_INSTALL "${TMP_RPM_DEBUGINFO_INSTALL}" PARENT_SCOPE)
|
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()
|
endfunction()
|
||||||
|
|
||||||
function(cpack_rpm_variable_fallback OUTPUT_VAR_NAME)
|
function(cpack_rpm_variable_fallback OUTPUT_VAR_NAME)
|
||||||
|
|
Loading…
Reference in New Issue