From 2bb1709ca38fd2e66dd179b26f20b5ad14770854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sun, 9 Oct 2022 17:03:15 +0000 Subject: [PATCH] env does not exist on Windows Also don't expect CTest to be in PATH use CMAKE_CTEST_COMMAND instead --- tests/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ea03ee4..73abfb9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -18,8 +18,8 @@ if (GCOV_ENABLE) # pass, .ctest-finished is created and we can check for its existance after generating the report to determine if the overall # build result is a pass or fail. add_custom_target(test_run_all - COMMAND cd ${PROJECT_BINARY_DIR} - COMMAND env CTEST_OUTPUT_ON_FAILURE=1 ctest --timeout 30 && ${CMAKE_COMMAND} -E touch .ctest-finished || exit 0 + COMMAND cd ${PROJECT_BINARY_DIR} + COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure --timeout 30 && ${CMAKE_COMMAND} -E touch .ctest-finished || exit 0 DEPENDS tests_clean tests )