summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack/STGZ/Prerequirements.cmake
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2017-01-19 22:02:07 (GMT)
committerDomen Vrankar <domen.vrankar@gmail.com>2017-01-22 21:07:16 (GMT)
commit624709c824a2d7a75a36dc23551377bdc2aee648 (patch)
tree7588deea12e7ad8bd53d8ba49d3d9c08fa5b0519 /Tests/RunCMake/CPack/STGZ/Prerequirements.cmake
parent1c93eb683b182b1f0bbdcbd39fc50ad48cc57739 (diff)
downloadCMake-624709c824a2d7a75a36dc23551377bdc2aee648.zip
CMake-624709c824a2d7a75a36dc23551377bdc2aee648.tar.gz
CMake-624709c824a2d7a75a36dc23551377bdc2aee648.tar.bz2
CPack/STGZ: minimalistic packages test
Diffstat (limited to 'Tests/RunCMake/CPack/STGZ/Prerequirements.cmake')
-rw-r--r--Tests/RunCMake/CPack/STGZ/Prerequirements.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/STGZ/Prerequirements.cmake b/Tests/RunCMake/CPack/STGZ/Prerequirements.cmake
new file mode 100644
index 0000000..3b015ca
--- /dev/null
+++ b/Tests/RunCMake/CPack/STGZ/Prerequirements.cmake
@@ -0,0 +1,11 @@
+function(get_test_prerequirements found_var config_file)
+ if(EXISTS "/bin/sh")
+ #gunzip is not part of posix so we should not rely on it being installed
+ find_program(GUNZIP_EXECUTABLE gunzip)
+
+ if(GUNZIP_EXECUTABLE)
+ file(WRITE "${config_file}" "")
+ set(${found_var} true PARENT_SCOPE)
+ endif()
+ endif()
+endfunction()