diff options
author | Matteo Martelli <matteomartelli3@gmail.com> | 2022-09-02 17:50:18 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-06 09:49:54 -0400 |
commit | 0c638ab59782fd5210255674f3456d0400ee0223 (patch) | |
tree | d06778a6142e064cf047f139c6a9c06dba78896b /Tests | |
parent | 01e95efc34a2a9bcf9910d65d3b38ff9b8a51750 (diff) | |
download | cmake-0c638ab59782fd5210255674f3456d0400ee0223.tar.gz |
CPack: re-use paths of tools discovered by CMakeFindBinUtils
`CMakeFindBinUtils.cmake` sets `CMAKE_<TOOL>` variables that in
cross-compilation environments point to the toolchain specific
executables: e.g. `CMAKE_OBJCOPY` might point to
`<path_to_toolchain>/arm-poky-linux-gnueabi-objcopy`.
Pass this information to CPack.
Diffstat (limited to 'Tests')
6 files changed, 11 insertions, 11 deletions
diff --git a/Tests/RunCMake/CPack/DEB/Helpers.cmake b/Tests/RunCMake/CPack/DEB/Helpers.cmake index 9b98ed41f1..8904c696fe 100644 --- a/Tests/RunCMake/CPack/DEB/Helpers.cmake +++ b/Tests/RunCMake/CPack/DEB/Helpers.cmake @@ -97,7 +97,7 @@ function(getMissingShlibsErrorExtra FILE RESULT_VAR) string(APPEND error_extra "; errors \"${deb_install_files_errors}\"") endif() - if(READELF_EXECUTABLE) + if(CPACK_READELF_EXECUTABLE) string(APPEND error_extra "; readelf \"\n") # Only dynamically linked ELF files are included @@ -106,7 +106,7 @@ function(getMissingShlibsErrorExtra FILE RESULT_VAR) if(_FILE MATCHES "ELF.*shared object") string(REGEX MATCH "(^.*):" _FILE_NAME "${_FILE}") - execute_process(COMMAND ${READELF_EXECUTABLE} -d "${CMAKE_MATCH_1}" + execute_process(COMMAND ${CPACK_READELF_EXECUTABLE} -d "${CMAKE_MATCH_1}" WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}" RESULT_VARIABLE result OUTPUT_VARIABLE output diff --git a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake index 60d02e718b..3b02579fb1 100644 --- a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake +++ b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake @@ -14,9 +14,9 @@ function(get_test_prerequirements found_var config_file) endif() # optional tool for some tests - find_program(READELF_EXECUTABLE NAMES readelf) - if(READELF_EXECUTABLE) + find_program(CPACK_READELF_EXECUTABLE NAMES readelf) + if(CPACK_READELF_EXECUTABLE) file(APPEND "${config_file}" - "\nset(READELF_EXECUTABLE \"${READELF_EXECUTABLE}\")") + "\nset(CPACK_READELF_EXECUTABLE \"${CPACK_READELF_EXECUTABLE}\")") endif() endfunction() diff --git a/Tests/RunCMake/CPack/RPM/Prerequirements.cmake b/Tests/RunCMake/CPack/RPM/Prerequirements.cmake index e95cd15161..a4741ba5b8 100644 --- a/Tests/RunCMake/CPack/RPM/Prerequirements.cmake +++ b/Tests/RunCMake/CPack/RPM/Prerequirements.cmake @@ -15,9 +15,9 @@ function(get_test_prerequirements found_var config_file) endif() # optional tool for some tests - find_program(OBJDUMP_EXECUTABLE objdump) - if(OBJDUMP_EXECUTABLE) + find_program(CPACK_OBJDUMP_EXECUTABLE objdump) + if(CPACK_OBJDUMP_EXECUTABLE) file(APPEND "${config_file}" - "\nset(OBJDUMP_EXECUTABLE \"${OBJDUMP_EXECUTABLE}\")") + "\nset(CPACK_OBJDUMP_EXECUTABLE \"${CPACK_OBJDUMP_EXECUTABLE}\")") endif() endfunction() diff --git a/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/DEB-Prerequirements.cmake b/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/DEB-Prerequirements.cmake index be44b2e337..b0bfc9d029 100644 --- a/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/DEB-Prerequirements.cmake +++ b/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/DEB-Prerequirements.cmake @@ -1,7 +1,7 @@ function(get_test_prerequirements found_var config_file) include(${config_file}) - if(READELF_EXECUTABLE) + if(CPACK_READELF_EXECUTABLE) set(${found_var} true PARENT_SCOPE) endif() endfunction() diff --git a/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS_LDCONFIG/DEB-Prerequirements.cmake b/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS_LDCONFIG/DEB-Prerequirements.cmake index be44b2e337..b0bfc9d029 100644 --- a/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS_LDCONFIG/DEB-Prerequirements.cmake +++ b/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS_LDCONFIG/DEB-Prerequirements.cmake @@ -1,7 +1,7 @@ function(get_test_prerequirements found_var config_file) include(${config_file}) - if(READELF_EXECUTABLE) + if(CPACK_READELF_EXECUTABLE) set(${found_var} true PARENT_SCOPE) endif() endfunction() diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-Prerequirements.cmake b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-Prerequirements.cmake index 90cfe4467f..f5df8a2dd8 100644 --- a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-Prerequirements.cmake +++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/RPM-Prerequirements.cmake @@ -2,7 +2,7 @@ function(get_test_prerequirements found_var config_file) if(SUBTEST_SUFFIX MATCHES ".*single_debug_info") include(${config_file}) - if(OBJDUMP_EXECUTABLE) + if(CPACK_OBJDUMP_EXECUTABLE) set(${found_var} true PARENT_SCOPE) endif() else() |