diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/CMakeLists.txt | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8e5e798..4c6c14c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,30 +1,19 @@ -include("FetchContent") - -FetchContent_Declare( - "Catch2" - URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.7.0.zip" - URL_HASH "SHA256=75b04c94471a70680f10f5d0d985bd1a96b8941d040d6a7bfd43f6c6b1de9daf" - EXCLUDE_FROM_ALL - FIND_PACKAGE_ARGS - "3.7.0" EXACT - COMPONENTS "Catch2WithMain" -) - -FetchContent_MakeAvailable("Catch2") - -include("Catch") - -file(GLOB SOURCES - RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" - CONFIGURE_DEPENDS - "src/*.cpp" -) - -add_executable("newtype_tests" - ${SOURCES} +add_executable("newtype_tests") + +target_sources("newtype_tests" PRIVATE + "src/arithmetic.cpp" + "src/constructors.cpp" + "src/conversion.cpp" + "src/derivation_clause.cpp" + "src/equality_comparison.cpp" + "src/hash.cpp" + "src/io_operators.cpp" + "src/iterable.cpp" + "src/relational_operators.cpp" + "src/threeway_comparison.cpp" ) -target_link_libraries("newtype_tests" +target_link_libraries("newtype_tests" PRIVATE "newtype::lib" "Catch2::Catch2WithMain" ) @@ -34,7 +23,6 @@ target_compile_options("newtype_tests" PRIVATE "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wextra>" "$<$<CXX_COMPILER_ID:GNU,Clang>:-Werror>" "$<$<CXX_COMPILER_ID:GNU,Clang>:-pedantic-errors>" - "$<$<CXX_COMPILER_ID:GNU>:-fconcepts-diagnostics-depth=5>" ) set_target_properties("newtype_tests" PROPERTIES |
