From 587b7b6f5ec252906e8d595d895e334680e341c9 Mon Sep 17 00:00:00 2001 From: David Cole Date: Wed, 28 Nov 2012 17:01:25 -0500 Subject: 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. --- Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Tests/CPackComponentsForAll') diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index 9a022c580c..0b6d07d970 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 -- cgit v1.2.1