Update Catch2 to v3

This commit is contained in:
Luca Matei Pintilie
2025-10-12 17:45:58 +02:00
committed by mathieui
parent c7a0ce553f
commit 5cb2802fd2
19 changed files with 23 additions and 50 deletions
+4 -18
View File
@@ -288,25 +288,11 @@ foreach(file ${source_all})
endforeach()
#
## Add a rule to download the catch unit test framework
## Catch unit test framework
#
include(ExternalProject)
ExternalProject_Add(catch
GIT_REPOSITORY "https://codeberg.org/poezio/Catch.git"
GIT_TAG "v1.5.9"
PREFIX "external"
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
)
set_target_properties(catch PROPERTIES EXCLUDE_FROM_ALL TRUE)
ExternalProject_Get_Property(catch SOURCE_DIR)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp)
target_include_directories(test_suite
PUBLIC "${SOURCE_DIR}/single_include/"
)
add_dependencies(test_suite catch)
find_package(Catch2)
if(Catch2_FOUND)
target_link_libraries(test_suite Catch2::Catch2WithMain)
endif()
#