From 1458273912809933e8fa5407704d9a68f660b0e1 Mon Sep 17 00:00:00 2001 From: speedie Date: Tue, 14 May 2024 20:33:05 +0200 Subject: [PATCH] Simplify testing. No need to use CMake testing module for this. --- CMakeLists.txt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 378d848..f2253ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,8 +70,6 @@ if (NOT WIN32 AND NOT APPLE) endif() if (CMAKE_BUILD_TYPE STREQUAL "Debug") - enable_testing() - find_package(Catch2 3 REQUIRED) add_executable(${PROJECT_NAME}_test @@ -86,17 +84,12 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") Catch2::Catch2WithMain ) - include(CTest) - include(Catch) - catch_discover_tests(${PROJECT_NAME}_test) - add_custom_command( TARGET ${PROJECT_NAME}_test COMMENT "Run tests" POST_BUILD WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure --rerun-failed -C - $ -R "^${PROJECT_NAME}_test$" + COMMAND ${PROJECT_NAME}_test ) endif()