From 021fe01eb05c18b15e94f475962fe23c2cacddb4 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Tue, 7 Apr 2026 23:20:03 +0200 Subject: [PATCH] Avoid CMake looking at test dir if testing is disabled This saves building the two test support programs. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ce4b025..6e1b8080 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,7 +160,9 @@ set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED True) add_subdirectory(src) -add_subdirectory(test) +if(BUILD_TESTING) # This option is defined implicitly by `include(CTest)`. + add_subdirectory(test) +endif() set(man1 "man/rgbasm.1" "man/rgbfix.1"