Skip to content

Commit a7f0669

Browse files
committed
cmake: Avoid including CTest if not top level project
Reported #145 (comment) this creates confusion in the bitoin core project because it adds a BUILD_TESTING variable which is confusing because bitcoin core uses a different BUILD_TESTS variable.
1 parent 26b9f3d commit a7f0669

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ set(MPGEN_EXECUTABLE "" CACHE FILEPATH "If specified, should be full path to an
2828

2929
include("cmake/compat_config.cmake")
3030
include("cmake/pthread_checks.cmake")
31-
include(CTest)
3231
include(GNUInstallDirs)
3332

3433
# Set convenience variables for subdirectories.
3534
set(MP_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
3635
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
3736
set(MP_STANDALONE TRUE)
37+
include(CTest)
3838
else()
3939
# Set MP_INCLUDE_DIR for parent directories too, so target_capnp_sources calls
4040
# in parent directories can use it and not need to specify include directories

0 commit comments

Comments
 (0)