Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FetchContent_Declare(
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.10.0
GIT_TAG v3.13.0
Comment thread
knoepfel marked this conversation as resolved.
GIT_SHALLOW ON
EXCLUDE_FROM_ALL # Do not install
FIND_PACKAGE_ARGS
Expand Down Expand Up @@ -89,6 +89,8 @@ set(CTEST_TEST_TIMEOUT 90 CACHE STRING "Per-test timeout (s) for CTest")

# Make tools available
FetchContent_MakeAvailable(Catch2 GSL mimicpp)
# Avoid use of __COUNTER__ to prevent -pedantic warnings in Catch2's TEST_CASE macro
set(CATCH_CONFIG_COUNTER OFF)

include(Modules/private/CreateCoverageTargets.cmake)

Expand Down Expand Up @@ -136,14 +138,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif()
endif()

# Catch2's TEST_CASE macro uses __COUNTER__, which Clang >= 22 flags as a C2y
# extension under -pedantic. Suppress the warning to avoid -Werror failures.
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "22")
add_compile_options(-Wno-c2y-extensions)
endif()
endif()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)

Expand Down
Loading