From: Daniel Arndt Date: Thu, 14 Mar 2019 18:06:29 +0000 (+0100) Subject: Fix 'test' target for MSVC X-Git-Tag: v9.1.0-rc1~243^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3a394d4e47307036dddd0cc3db5bedc8424019c;p=dealii.git Fix 'test' target for MSVC --- diff --git a/tests/quick_tests/CMakeLists.txt b/tests/quick_tests/CMakeLists.txt index f76cfc008b..8393f3ed1c 100644 --- a/tests/quick_tests/CMakeLists.txt +++ b/tests/quick_tests/CMakeLists.txt @@ -44,9 +44,9 @@ MACRO(make_quicktest test_basename build_name mpi_run) DEAL_II_INSOURCE_SETUP_TARGET(${_target} ${build_name}) IF("${mpi_run}" STREQUAL "") - SET(_command ./${_target}) + SET(_command ${_target}) ELSE() - SET(_command ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${mpi_run} ${MPIEXEC_PREFLAGS} ./${_target}) + SET(_command ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${mpi_run} ${MPIEXEC_PREFLAGS} ${_target}) ENDIF() ADD_CUSTOM_TARGET(${_target}.run DEPENDS ${_target} @@ -195,7 +195,7 @@ ENDIF() # A custom test target: ADD_CUSTOM_TARGET(test - COMMAND ${CMAKE_COMMAND} -D ALL_TESTS="${ALL_TESTS}" -P ${CMAKE_CURRENT_SOURCE_DIR}/run.cmake + COMMAND ${CMAKE_COMMAND} -D ALL_TESTS="${ALL_TESTS}" -DCMAKE_BUILD_TYPE=${_mybuild} -P ${CMAKE_CURRENT_SOURCE_DIR}/run.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Running quicktests..." ) diff --git a/tests/quick_tests/run.cmake b/tests/quick_tests/run.cmake index 4e4c212998..ab6e7fc806 100644 --- a/tests/quick_tests/run.cmake +++ b/tests/quick_tests/run.cmake @@ -25,6 +25,7 @@ ENDIF() SEPARATE_ARGUMENTS(ALL_TESTS) EXECUTE_PROCESS(COMMAND ${CMAKE_CTEST_COMMAND} -j${_n_processors} + -C ${CMAKE_BUILD_TYPE} --force-new-ctest-process --output-on-failure -O quicktests.log