2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Only enable tests when root project

This commit is contained in:
Peter Dimov
2021-05-27 20:37:47 +03:00
parent 20de153ca3
commit a1d76a4fc3

View File

@@ -41,8 +41,10 @@ else()
endif()
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
# Only enable tests when we're the root project
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
include(CTest)
add_subdirectory(test)
endif()