CMake: use BUILD_TESTING to control whether we shall enable testing

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Thiago Macieira
2025-03-18 16:43:48 -07:00
parent 52cc7153b4
commit 09e80842a5
+4 -2
View File
@@ -120,5 +120,7 @@ install(
set (PROJECT_LIBRARIES tinycbor)
include(PackageConfig)
enable_testing()
add_subdirectory(tests)
if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests)
endif()