diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2016-11-27 19:35:13 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2016-11-27 22:20:35 (GMT) |
commit | a8a47098082a57a5b22cac546f030b551e1b9c32 (patch) | |
tree | 5fe975d99ff737c629d42c1d00ac0c3f2f400b82 /Tests | |
parent | 48456535f3c59e19572857d7071d9551783e06d6 (diff) | |
download | CMake-a8a47098082a57a5b22cac546f030b551e1b9c32.zip CMake-a8a47098082a57a5b22cac546f030b551e1b9c32.tar.gz CMake-a8a47098082a57a5b22cac546f030b551e1b9c32.tar.bz2 |
Tests: CPack/DEB test change prerequirements check
Prerequirements should be searched for in
generator prerequirements function and only
checked for presence in configure file in
per test prerequirements function.
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) |