Skip to content

Commit

Permalink
Enforce Catch2 version and apply ITERATOR_DEBUG_LEVEL
Browse files Browse the repository at this point in the history
  • Loading branch information
Gulin7 committed Dec 4, 2024
1 parent 4311f43 commit 879d66f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
endif()

find_package(doctest REQUIRED)
find_package(Catch2 REQUIRED)
find_package(Catch2 3 REQUIRED)

# find_package(Threads)
if(NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -201,6 +201,11 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "C
endif()
endif()

if (CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "MultiThreadedDLL")
list(APPEND compiles_options /D_ITERATOR_DEBUG_LEVEL=0)
endif()


target_compile_options(${test_target}
PRIVATE
${compiles_options}
Expand Down
5 changes: 4 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"dependencies": [
"doctest",
"date",
"catch2",
{
"name": "catch2",
"version>=": "3.2.0"
},
{
"name": "vcpkg-tool-ninja",
"host": true
Expand Down

0 comments on commit 879d66f

Please sign in to comment.