aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2026-01-06 14:19:58 +0100
committerFelix Morgner <felix.morgner@gmail.com>2026-01-06 14:19:58 +0100
commit66e986572d65e622e78190aa971313ed7e3c8b9b (patch)
treed3bcdaf2eeb66da2d3898e037224c99c3ad426c1 /tests
parentd9ab9b52be6950f5429d9b9b4d3596599f53449d (diff)
downloadnewtype-develop.tar.xz
newtype-develop.zip
build: clean up configurationHEADdevelop
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt40
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