From b633b263082ae2c74a030aefb9048b0a20098b61 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 7 Mar 2014 10:53:45 -0500 Subject: [PATCH] CPackWiX: Fix test to build with expected config --- Tests/CMakeLists.txt | 2 ++ Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 854b239d6..7b4d1494b 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -829,6 +829,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ if(WIX_LIGHT_EXECUTABLE) add_test(CPackWiXGenerator ${CMAKE_CTEST_COMMAND} + -C \${CTEST_CONFIGURATION_TYPE} --build-and-test "${CMake_SOURCE_DIR}/Tests/CPackWiXGenerator" "${CMake_BINARY_DIR}/Tests/CPackWiXGenerator" @@ -837,6 +838,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-options ${build_options} --test-command ${CMAKE_CMAKE_COMMAND} "-DCPackWiXGenerator_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/CPackWiXGenerator" + "-Dconfig=\${CTEST_CONFIGURATION_TYPE}" -P "${CMake_SOURCE_DIR}/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake") endif() endif() diff --git a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake index 30e33cf22..ca9fd9049 100644 --- a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake +++ b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake @@ -10,7 +10,12 @@ message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}") message(STATUS "CMAKE_CPACK_COMMAND: ${CMAKE_CPACK_COMMAND}") message(STATUS "CPackWiXGenerator_BINARY_DIR: ${CPackWiXGenerator_BINARY_DIR}") +if(config) + set(_C_config -C ${config}) +endif() + execute_process(COMMAND "${CMAKE_CPACK_COMMAND}" + ${_C_config} RESULT_VARIABLE CPack_result OUTPUT_VARIABLE CPack_output ERROR_VARIABLE CPack_error