Skip to content

Commit

Permalink
Bump catch2 version to latest release
Browse files Browse the repository at this point in the history
This is needed to get the fix for catchorg/Catch2#2421

Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Dec 20, 2023
1 parent 913f792 commit 7c6044a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/ExternalDependenciesVersions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# need Boost.CallableTraits (header only, part of Boost 1.66 released in Dec 2017) for wrap.h to work
set(TTG_TRACKED_BOOST_VERSION 1.66)
set(TTG_TRACKED_CATCH2_VERSION 2.13.1)
set(TTG_TRACKED_CATCH2_VERSION 3.5.0)
set(TTG_TRACKED_CEREAL_VERSION 1.3.0)
set(TTG_TRACKED_MADNESS_TAG cb195817d7807c4aead10ba200cd20649036cbae)
set(TTG_TRACKED_PARSEC_TAG 25d1931e863b6741e453112d2117d85ad32e7fba)
Expand Down
17 changes: 10 additions & 7 deletions tests/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,20 @@ set(ut_libs Catch2::Catch2)
add_ttg_executable(core-unittests-ttg "${ut_src}" LINK_LIBRARIES "${ut_libs}" COMPILE_DEFINITIONS "CATCH_CONFIG_NO_POSIX_SIGNALS=1" )

# serialization test: probes serialization via all supported serialization methods (MADNESS, Boost::serialization, cereal) that are available
add_executable(serialization "serialization.cc;unit_main.cpp")
target_link_libraries(serialization "Catch2::Catch2;ttg-serialization")
if (TARGET BTAS::BTAS)
target_link_libraries(serialization BTAS::BTAS)
target_compile_definitions(serialization PRIVATE TTG_HAS_BTAS=1)
endif (TARGET BTAS::BTAS)
add_ttg_executable(serialization serialization.cc unit_main.cpp
LINK_LIBRARIES Catch2::Catch2 ttg-serialization $<TARGET_NAME_IF_EXISTS:BTAS::BTAS>
COMPILE_DEFINITIONS $<$<TARGET_EXISTS:BTAS::BTAS>:TTG_HAS_BTAS=1>)
#target_link_libraries(serialization "Catch2::Catch2;ttg-serialization")
#if (TARGET BTAS::BTAS)
# target_link_libraries(serialization BTAS::BTAS)
# target_compile_definitions(serialization PRIVATE TTG_HAS_BTAS=1)
#endif (TARGET BTAS::BTAS)

# TODO: convert into unit test
#if (TARGET MADworld)
#add_executable(splitmd_serialization splitmd_serialization.cc unit_main.cpp)
#endif(TARGET MADworld)


catch_discover_tests(serialization TEST_PREFIX "ttg/test/unit/")
catch_discover_tests(serialization-parsec TEST_PREFIX "ttg/test/unit/")
catch_discover_tests(serialization-mad TEST_PREFIX "ttg/test/unit/")
2 changes: 1 addition & 1 deletion tests/unit/serialization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ namespace freestanding::symmetric::bc_v {

#include "ttg/serialization/data_descriptor.h"

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

static_assert(ttg::detail::is_madness_buffer_serializable_v<int>);
static_assert(!ttg::detail::is_madness_user_buffer_serializable_v<int>);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/unit_main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define CATCH_CONFIG_RUNNER

#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>

#include <clocale>
#include <iostream>
Expand Down

0 comments on commit 7c6044a

Please sign in to comment.