diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2015-09-28 20:50:15 (GMT) |
---|---|---|
committer | Domen Vrankar <domen.vrankar@gmail.com> | 2015-09-28 23:18:18 (GMT) |
commit | 9298f56dcedb888ff140b6b1aab90be91162d50f (patch) | |
tree | bb61e7768f1ef64290eddfe9becf001c5968aae9 /Tests/RunCMake/CPack/TGZ/Helpers.cmake | |
parent | ecd71c9c1a0735cb84234344387f4138a1853fa5 (diff) | |
download | CMake-9298f56dcedb888ff140b6b1aab90be91162d50f.zip CMake-9298f56dcedb888ff140b6b1aab90be91162d50f.tar.gz CMake-9298f56dcedb888ff140b6b1aab90be91162d50f.tar.bz2 |
CPack: allow packaging of empty directories
Diffstat (limited to 'Tests/RunCMake/CPack/TGZ/Helpers.cmake')
-rw-r--r-- | Tests/RunCMake/CPack/TGZ/Helpers.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/TGZ/Helpers.cmake b/Tests/RunCMake/CPack/TGZ/Helpers.cmake new file mode 100644 index 0000000..f14d532 --- /dev/null +++ b/Tests/RunCMake/CPack/TGZ/Helpers.cmake @@ -0,0 +1,10 @@ +set(ALL_FILES_GLOB "*.tar.gz") + +function(getPackageContent FILE RESULT_VAR) + execute_process(COMMAND ${CMAKE_COMMAND} -E tar -ztvf ${FILE} + OUTPUT_VARIABLE package_content_ + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE) +endfunction() |