Only build tests if top level project (#639)

This commit is contained in:
Kai Szuttor 2022-11-25 16:59:08 +01:00 committed by GitHub
parent cdf8a3616f
commit 1e11aff7b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,9 +73,9 @@ if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/etl DESTINATION include)
endif()
if (BUILD_TESTS)
enable_testing()
add_subdirectory(test)
if (BUILD_TESTS)
enable_testing()
add_subdirectory(test)
endif()
endif()