diff --git a/cmake/modules/ExternalDependenciesVersions.cmake b/cmake/modules/ExternalDependenciesVersions.cmake index 1e6dd1fef..8d763f5db 100644 --- a/cmake/modules/ExternalDependenciesVersions.cmake +++ b/cmake/modules/ExternalDependenciesVersions.cmake @@ -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) diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 154f03183..6b524010f 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -20,12 +20,14 @@ 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 $ + COMPILE_DEFINITIONS $<$: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) @@ -33,4 +35,5 @@ endif (TARGET BTAS::BTAS) #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/") diff --git a/tests/unit/serialization.cc b/tests/unit/serialization.cc index 647f7d1ec..0c14cfaca 100644 --- a/tests/unit/serialization.cc +++ b/tests/unit/serialization.cc @@ -463,7 +463,7 @@ namespace freestanding::symmetric::bc_v { #include "ttg/serialization/data_descriptor.h" -#include +#include static_assert(ttg::detail::is_madness_buffer_serializable_v); static_assert(!ttg::detail::is_madness_user_buffer_serializable_v); diff --git a/tests/unit/unit_main.cpp b/tests/unit/unit_main.cpp index 7ca861716..e4a923cd3 100644 --- a/tests/unit/unit_main.cpp +++ b/tests/unit/unit_main.cpp @@ -1,6 +1,6 @@ #define CATCH_CONFIG_RUNNER -#include +#include #include #include