diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2015-07-29 21:34:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-08-06 13:33:50 (GMT) |
commit | d882d4770fec6d65d82d818b4979cb5763d253c1 (patch) | |
tree | b4b56b8e8e72daff93ebb4010baba9e5f99280aa /Tests/RunCMake/CPack | |
parent | 145735b748ab04505ab7a885a54fbd175ccecee2 (diff) | |
download | CMake-d882d4770fec6d65d82d818b4979cb5763d253c1.zip CMake-d882d4770fec6d65d82d818b4979cb5763d253c1.tar.gz CMake-d882d4770fec6d65d82d818b4979cb5763d253c1.tar.bz2 |
Tests/RunCMake/CPack/DEB: Add getPackageInfo helper function
getPackageInfo helper function returns package info
for provided deb package file
Diffstat (limited to 'Tests/RunCMake/CPack')
-rw-r--r-- | Tests/RunCMake/CPack/DEB/Helpers.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/DEB/Helpers.cmake b/Tests/RunCMake/CPack/DEB/Helpers.cmake index 45c85c3..a204a3c 100644 --- a/Tests/RunCMake/CPack/DEB/Helpers.cmake +++ b/Tests/RunCMake/CPack/DEB/Helpers.cmake @@ -26,3 +26,13 @@ function(verifyDebControl FILE PREFIX VERIFY_FILES) endif() endforeach() endfunction() + +function(getPackageInfo FILE RESULT_VAR) + execute_process(COMMAND ${DPKG_EXECUTABLE} -I ${FILE} + WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}" + OUTPUT_VARIABLE package_info_ + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + set(${RESULT_VAR} "${package_info_}" PARENT_SCOPE) +endfunction() |