diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2010-12-14 18:42:21 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2010-12-14 18:42:21 (GMT) |
commit | 86979e49a16b0fc2976329480d236e62471f331a (patch) | |
tree | 984cdf40a008b684ee68c138f8a8a1917ce2030b /Tests/CPackComponentsForAll | |
parent | cdf92c952a40650a5bc37e93489e4b3130841d82 (diff) | |
download | CMake-86979e49a16b0fc2976329480d236e62471f331a.zip CMake-86979e49a16b0fc2976329480d236e62471f331a.tar.gz CMake-86979e49a16b0fc2976329480d236e62471f331a.tar.bz2 |
Change cpack run and verify script to work with multi-config generators.
Use the location of the running cmake to find cpack, and use the
CMAKE_CONFIG_TYPE environtment variable as a type for cpack.
Diffstat (limited to 'Tests/CPackComponentsForAll')
-rw-r--r-- | Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake index b0cacb8..11f72ec 100644 --- a/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake +++ b/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake @@ -9,7 +9,9 @@ endif(NOT CPackComponentsForAll_BINARY_DIR) if(NOT CPackGen) message(FATAL_ERROR "CPackGen not set") endif(NOT CPackGen) - +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") endif(NOT CPackCommand) @@ -24,8 +26,13 @@ set(expected_file_mask "") # May produce several numbers of files depending on # CPACK_COMPONENT_xxx values set(expected_count 1) - -execute_process(COMMAND ${CPackCommand} -G ${CPackGen} -C Release +set(config_type $ENV{CMAKE_CONFIG_TYPE}) +set(config_args ) +if(config_type) + set(config_args -C ${config_type}) +endif() +message(" ${config_args}") +execute_process(COMMAND ${CPackCommand} -G ${CPackGen} ${config_args} RESULT_VARIABLE CPack_result OUTPUT_VARIABLE CPack_output ERROR_VARIABLE CPack_error |