summaryrefslogtreecommitdiffstats
path: root/Tests/CPackComponentsForAll
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-11-28 22:01:25 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-11-29 20:49:36 (GMT)
commit587b7b6f5ec252906e8d595d895e334680e341c9 (patch)
tree762bf2a04c2450c647211673b505b378fc89490d /Tests/CPackComponentsForAll
parentd5ac791366595be307896e9894c66815c1e1eb2f (diff)
downloadCMake-587b7b6f5ec252906e8d595d895e334680e341c9.zip
CMake-587b7b6f5ec252906e8d595d895e334680e341c9.tar.gz
CMake-587b7b6f5ec252906e8d595d895e334680e341c9.tar.bz2
Tests: Use the right path to CPack value for running CPack tests
These tests were not running properly on Visual Studio or Xcode dashboards before this commit because of the "Debug" or "Release" sub-directory. The scripts already have CMAKE_CPACK_COMMAND since the correct CMake executable is used to run the scripts, so just use that, rather than passing down an incorrect path to the CPack executable.
Diffstat (limited to 'Tests/CPackComponentsForAll')
-rw-r--r--Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake11
1 files changed, 5 insertions, 6 deletions
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
index 9a022c5..0b6d07d 100644
--- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
@@ -9,11 +9,10 @@ endif()
if(NOT CPackGen)
message(FATAL_ERROR "CPackGen not set")
endif()
-get_filename_component(CPACK_LOCATION ${CMAKE_COMMAND} PATH)
-set(CPackCommand "${CPACK_LOCATION}/cpack")
-message("cpack = ${CPackCommand}")
-if(NOT CPackCommand)
- message(FATAL_ERROR "CPackCommand not set")
+
+message("CMAKE_CPACK_COMMAND = ${CMAKE_CPACK_COMMAND}")
+if(NOT CMAKE_CPACK_COMMAND)
+ message(FATAL_ERROR "CMAKE_CPACK_COMMAND not set")
endif()
if(NOT CPackComponentWay)
@@ -92,7 +91,7 @@ endif()
message("config_args = ${config_args}")
message("config_verbose = ${config_verbose}")
-execute_process(COMMAND ${CPackCommand} ${config_verbose} -G ${CPackGen} ${config_args}
+execute_process(COMMAND ${CMAKE_CPACK_COMMAND} ${config_verbose} -G ${CPackGen} ${config_args}
RESULT_VARIABLE CPack_result
OUTPUT_VARIABLE CPack_output
ERROR_VARIABLE CPack_error