From 23d857191f55ea3b99bcbac8b208428807652b57 Mon Sep 17 00:00:00 2001 From: Natalie Martin Date: Tue, 23 Jan 2024 19:49:50 -0700 Subject: [PATCH] Automatically register Catch2 tests --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 091e1eb..e5340bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,13 @@ FetchContent_MakeAvailable(raylib) add_executable(adagio ${SOURCES}) target_link_libraries(adagio raylib) + add_subdirectory(third_party/entt) add_subdirectory(third_party/Catch2) add_executable(adagio_test ${TESTS}) target_link_libraries(adagio_test PRIVATE Catch2::Catch2 raylib EnTT::EnTT) + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/third_party/Catch2/contrib) +include(CTest) +include(Catch) +catch_discover_tests(adagio_test)