dep: Add catch2 unit test framework and wire it up

To enable the test suite, make sure to configure CMake with -DBUILD_TESTING=1 , since it is disabled by default. The catch2 dependency will be downloaded during configure time.

Also add a new target "tests-common", which includes unit tests for the "common" project. To finally run the tests use the "test" target.

CircleCI: Run unit tests
(cherry picked from commit 6a28ee7b2a4269aa7e43265d1cd0067537e3e883)
This commit is contained in:
Carbenium authored and funjoker committed 2021-07-29 19:07:52 +02:00
1 parent 99a129d5bc
commit 831c45b1da
8 files changed
+83 -4

No files matched your search

+1
View File
@@ -50,4 +50,5 @@ option(WITH_COREDEBUG "Include additional debug-code in core"
set(WITH_SOURCE_TREE "hierarchical" CACHE STRING "Build the source tree for IDE's.")
set_property(CACHE WITH_SOURCE_TREE PROPERTY STRINGS no flat hierarchical hierarchical-folders)
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
option(BUILD_TESTING "Build test suite" 0)
+6
View File
@@ -35,6 +35,12 @@ else()
message("* Build map/vmap tools : No")
endif()
if(BUILD_TESTING)
message("* Build unit tests : Yes")
else()
message("* Build unit tests : No (default)")
endif()
if( USE_COREPCH )
message("* Build core w/PCH : Yes (default)")
else()