CPackWiX: Fix test to build with expected config

This commit is contained in:
Brad King 2014-03-07 10:53:45 -05:00
parent 191f25e2bd
commit b633b26308
2 changed files with 7 additions and 0 deletions

View File

@ -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()

View File

@ -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