diff --git a/CMakeLists.txt b/CMakeLists.txt index eb361e0..5894a42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -539,7 +539,7 @@ write_basic_package_version_file( VERSION ${PROJECT_VERSION} COMPATIBILITY AnyNewerVersion) -if(BUILD_TESTING) +if(BUILD_TESTING AND PROJECT_IS_TOP_LEVEL) add_subdirectory(test) endif()