From 0279742c0ec07fd722e49b746bbe5b9153e50172 Mon Sep 17 00:00:00 2001 From: Leo Sulzbacher Date: Sun, 15 Mar 2026 02:08:37 +0100 Subject: [PATCH] fix: only build tests if top level --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index be83334..156390f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,6 @@ project(curtle VERSION 0.1.1 LANGUAGES C) include(GNUInstallDirs) include(CMakePackageConfigHelpers) -include(CTest) set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) @@ -54,7 +53,7 @@ install(FILES DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/curtle ) -if(BUILD_TESTING) +if(${PROJECT_IS_TOP_LEVEL}) enable_testing() add_subdirectory(tests) endif() \ No newline at end of file -- 2.49.1