summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-08-09 15:32:23 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-08-09 15:32:23 (GMT)
commitfe3d8078c5dc9b1bd762a0d0f51966bc78a14a79 (patch)
treef80f2828a7d4bd1104543dc91009d35faf626f86
parent8c94be3f1831eb18a6cf77d31986ec45d0fe4831 (diff)
downloadCMake-fe3d8078c5dc9b1bd762a0d0f51966bc78a14a79.zip
CMake-fe3d8078c5dc9b1bd762a0d0f51966bc78a14a79.tar.gz
CMake-fe3d8078c5dc9b1bd762a0d0f51966bc78a14a79.tar.bz2
ENH: try to fix compress failure
-rw-r--r--Tests/SimpleInstall/CMakeLists.txt10
-rw-r--r--Tests/SimpleInstallS2/CMakeLists.txt10
2 files changed, 16 insertions, 4 deletions
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index b5f53ba..eb8a97f 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -176,18 +176,24 @@ IF(WIN32 AND NOT UNIX)
SET(CPACK_GENERATOR TGZ)
ENDIF(NOT NSIS_MAKENSIS)
ENDIF(WIN32 AND NOT UNIX)
-
IF(UNIX AND NOT APPLE)
SET(CPACK_GENERATOR "TGZ;STGZ")
FIND_PROGRAM(found_compress
NAMES compress)
IF(found_compress)
- EXECUTE_PROCESS(COMMAND file ${found_compress} OUTPUT_VARIABLE output)
+ FIND_PROGRAM(file_command NAMES file)
+ IF(NOT file_command)
+ set(file_command file)
+ ENDIF(NOT file_command)
+ EXECUTE_PROCESS(COMMAND ${file_command} ${found_compress}
+ OUTPUT_VARIABLE output)
if(NOT "${output}" MATCHES "script")
message("compress found and it was not a script")
+ message("output from file command: [${output}]")
SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
else(NOT "${output}" MATCHES "script")
message("compress found, but it was a script so dont use it")
+ message("output from file command: [${output}]")
endif(NOT "${output}" MATCHES "script")
ENDIF(found_compress)
FIND_PROGRAM(found_bz2
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index b5f53ba..eb8a97f 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -176,18 +176,24 @@ IF(WIN32 AND NOT UNIX)
SET(CPACK_GENERATOR TGZ)
ENDIF(NOT NSIS_MAKENSIS)
ENDIF(WIN32 AND NOT UNIX)
-
IF(UNIX AND NOT APPLE)
SET(CPACK_GENERATOR "TGZ;STGZ")
FIND_PROGRAM(found_compress
NAMES compress)
IF(found_compress)
- EXECUTE_PROCESS(COMMAND file ${found_compress} OUTPUT_VARIABLE output)
+ FIND_PROGRAM(file_command NAMES file)
+ IF(NOT file_command)
+ set(file_command file)
+ ENDIF(NOT file_command)
+ EXECUTE_PROCESS(COMMAND ${file_command} ${found_compress}
+ OUTPUT_VARIABLE output)
if(NOT "${output}" MATCHES "script")
message("compress found and it was not a script")
+ message("output from file command: [${output}]")
SET(CPACK_GENERATOR "${CPACK_GENERATOR};TZ")
else(NOT "${output}" MATCHES "script")
message("compress found, but it was a script so dont use it")
+ message("output from file command: [${output}]")
endif(NOT "${output}" MATCHES "script")
ENDIF(found_compress)
FIND_PROGRAM(found_bz2