Commit d3a7a352d59e4075e979bfe9aea73f0f531c32eb

Edward Thomson 2021-11-06T16:44:07

cmake: move test enablement into test cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23d0968..ae0a5d6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,7 +111,6 @@ include(DefaultCFlags)
 add_subdirectory(src)
 
 if(BUILD_TESTS)
-	enable_testing()
 	add_subdirectory(tests)
 endif()
 
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index b85cd6e..760925f 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -62,6 +62,8 @@ function(ADD_CLAR_TEST name)
 	endif()
 endfunction(ADD_CLAR_TEST)
 
+enable_testing()
+
 add_clar_test(offline             -v -xonline)
 add_clar_test(invasive            -v -score::ftruncate -sfilter::stream::bigfile -sodb::largefiles -siterator::workdir::filesystem_gunk -srepo::init -srepo::init::at_filesystem_root)
 add_clar_test(online              -v -sonline -xonline::customcert)