aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorCarbenium <carbenium@outlook.com>2020-07-22 20:27:54 +0200
committerPeter Keresztes Schmidt <carbenium@outlook.com>2020-07-24 12:00:54 +0200
commit6a28ee7b2a4269aa7e43265d1cd0067537e3e883 (patch)
tree0318b45951240f81cdf9c3c36e493e16d75f81be /cmake
parent3c0ac7302f902d1811d2c215217a3d701f8b5b19 (diff)
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
Diffstat (limited to 'cmake')
-rw-r--r--cmake/options.cmake1
-rw-r--r--cmake/showoptions.cmake6
2 files changed, 7 insertions, 0 deletions
diff --git a/cmake/options.cmake b/cmake/options.cmake
index 7dffa37bdb0..e57ca22fb17 100644
--- a/cmake/options.cmake
+++ b/cmake/options.cmake
@@ -54,3 +54,4 @@ option(COPY_CONF "Copy authserver and worldserver .conf.dist files to the
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)
diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake
index 9d4678335f0..45e06b3321e 100644
--- a/cmake/showoptions.cmake
+++ b/cmake/showoptions.cmake
@@ -40,6 +40,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()