summaryrefslogtreecommitdiff
path: root/Tests/SimpleInstallS2/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/SimpleInstallS2/CMakeLists.txt')
-rw-r--r--Tests/SimpleInstallS2/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index 08a2b01b60..b5f53ba264 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -182,7 +182,13 @@ IF(UNIX AND NOT APPLE)
FIND_PROGRAM(found_compress
NAMES compress)
IF(found_compress)
- SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
+ EXECUTE_PROCESS(COMMAND file ${found_compress} OUTPUT_VARIABLE output)
+ if(NOT "${output}" MATCHES "script")
+ message("compress found and it was not a script")
+ SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
+ else(NOT "${output}" MATCHES "script")
+ message("compress found, but it was a script so dont use it")
+ endif(NOT "${output}" MATCHES "script")
ENDIF(found_compress)
FIND_PROGRAM(found_bz2
NAMES bzip2)