summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack/TGZ/Helpers.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CPack/TGZ/Helpers.cmake')
-rw-r--r--Tests/RunCMake/CPack/TGZ/Helpers.cmake10
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()