Skip to content

Commit 63ac092

Browse files
committed
CTest: Module must be included at the top level
In order to be able to run `ctest` from the top level build directory, it is necessary that `enable_testing()` is invoked in the top level CMakeLists.txt file. The `CTest` module invokes `enable_testing()` based on the value of `BUILD_TESTING`.
1 parent 477405e commit 63ac092

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ set(Libmultiprocess_EXTERNAL_MPGEN "" CACHE FILEPATH "If specified, should be fu
2828

2929
include("cmake/compat_config.cmake")
3030
include("cmake/pthread_checks.cmake")
31+
include(CTest)
3132
include(GNUInstallDirs)
3233

3334
# Set convenience variables for subdirectories.

test/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# Distributed under the MIT software license, see the accompanying
33
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
include(CTest)
6-
75
# Custom test targets for convenience, based on
86
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/tutorials/EmulateMakeCheck.
97
#

0 commit comments

Comments
 (0)