diff --git a/CMakeLists.txt b/CMakeLists.txt index 91f376d..d8c2426 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,7 +93,7 @@ endif() # Dependencies if (NOT TARGET Catch2::Catch2) - find_package(Catch2 QUIET) + find_package(Catch2 3 QUIET) endif() if (NOT TARGET fmt::fmt) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e0ce032..d5bbbde 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,14 +2,13 @@ add_executable(mcl-tests bit/bit_field_tests.cpp container/hmap.cpp container/ihmap.cpp - main.cpp mp/metavalue_tests.cpp mp/typelist_tests.cpp type_traits/type_traits_tests.cpp ) target_include_directories(mcl-tests PUBLIC .) target_compile_options(mcl-tests PRIVATE ${STAMINA_CXX_FLAGS}) -target_link_libraries(mcl-tests PRIVATE Catch2::Catch2 mcl) +target_link_libraries(mcl-tests PRIVATE Catch2::Catch2WithMain mcl) include(CTest) include(Catch) diff --git a/tests/bit/bit_field_tests.cpp b/tests/bit/bit_field_tests.cpp index 42b88c1..4a5a4ab 100644 --- a/tests/bit/bit_field_tests.cpp +++ b/tests/bit/bit_field_tests.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include diff --git a/tests/container/hmap.cpp b/tests/container/hmap.cpp index 71cd419..052a1d1 100644 --- a/tests/container/hmap.cpp +++ b/tests/container/hmap.cpp @@ -4,7 +4,7 @@ #include -#include +#include #include #include #include diff --git a/tests/container/ihmap.cpp b/tests/container/ihmap.cpp index 693b541..5815b7e 100644 --- a/tests/container/ihmap.cpp +++ b/tests/container/ihmap.cpp @@ -4,7 +4,7 @@ #include -#include +#include #include #include #include diff --git a/tests/main.cpp b/tests/main.cpp deleted file mode 100644 index 14b471b..0000000 --- a/tests/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// This file is part of the mcl project. -// Copyright (c) 2022 merryhime -// SPDX-License-Identifier: MIT - -#define CATCH_CONFIG_MAIN -#include "catch2/catch.hpp"