--- CMakeLists.txt.orig	2025-12-24 18:53:34 UTC
+++ CMakeLists.txt
@@ -11,19 +11,12 @@ include(GNUInstallDirs)
 option(NBYTES_DEVELOPMENT_CHECKS "Enable development checks" OFF)
 
 include(GNUInstallDirs)
-include(FetchContent)
 
-FetchContent_Declare(
-  googletest
-  URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
-)
-# For Windows: Prevent overriding the parent project's compiler/linker settings
-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
-FetchContent_MakeAvailable(googletest)
-
 add_subdirectory(src)
-enable_testing()
-add_subdirectory(tests)
+if (BUILD_TESTING)
+  enable_testing()
+  add_subdirectory(tests)
+endif()
 
 install(
   FILES include/nbytes.h
