diff options
Diffstat (limited to 'Tests')
4 files changed, 11 insertions, 6 deletions
diff --git a/Tests/RunCMake/CPack/DEB/Helpers.cmake b/Tests/RunCMake/CPack/DEB/Helpers.cmake index 349b987..ad1b47b 100644 --- a/Tests/RunCMake/CPack/DEB/Helpers.cmake +++ b/Tests/RunCMake/CPack/DEB/Helpers.cmake @@ -84,8 +84,6 @@ function(getMissingShlibsErrorExtra FILE RESULT_VAR) string(APPEND error_extra "; errors \"${deb_install_files_errors}\"") endif() - find_program(READELF_EXECUTABLE NAMES readelf) - if(READELF_EXECUTABLE) string(APPEND error_extra "; readelf \"\n") diff --git a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake index cb9a277..60d02e7 100644 --- a/Tests/RunCMake/CPack/DEB/Prerequirements.cmake +++ b/Tests/RunCMake/CPack/DEB/Prerequirements.cmake @@ -12,4 +12,11 @@ function(get_test_prerequirements found_var config_file) file(APPEND "${config_file}" "\nset(FAKEROOT_EXECUTABLE \"${FAKEROOT_EXECUTABLE}\")") endif() + + # optional tool for some tests + find_program(READELF_EXECUTABLE NAMES readelf) + if(READELF_EXECUTABLE) + file(APPEND "${config_file}" + "\nset(READELF_EXECUTABLE \"${READELF_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 b98065a..be44b2e 100644 --- a/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/DEB-Prerequirements.cmake +++ b/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS/DEB-Prerequirements.cmake @@ -1,5 +1,5 @@ -function(get_test_prerequirements found_var) - find_program(READELF_EXECUTABLE NAMES readelf) +function(get_test_prerequirements found_var config_file) + include(${config_file}) if(READELF_EXECUTABLE) set(${found_var} true PARENT_SCOPE) 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 b98065a..be44b2e 100644 --- a/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS_LDCONFIG/DEB-Prerequirements.cmake +++ b/Tests/RunCMake/CPack/tests/GENERATE_SHLIBS_LDCONFIG/DEB-Prerequirements.cmake @@ -1,5 +1,5 @@ -function(get_test_prerequirements found_var) - find_program(READELF_EXECUTABLE NAMES readelf) +function(get_test_prerequirements found_var config_file) + include(${config_file}) if(READELF_EXECUTABLE) set(${found_var} true PARENT_SCOPE) |