From 1f92566e02071ad12ba37486a3d3b3d518f857f6 Mon Sep 17 00:00:00 2001 From: Pablo Rodriguez Avila Date: Thu, 5 Oct 2023 14:08:58 +0100 Subject: [PATCH] Add BUILD_TESTS CMake option --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f95d2ba..453cdd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,7 @@ project (kaitai_struct_cpp_stl_runtime CXX) enable_testing() option(BUILD_SHARED_LIBS "Build using shared libraries" ON) +option(BUILD_TESTS "Build tests" ON) set (CMAKE_INCLUDE_CURRENT_DIR ON) @@ -46,4 +47,6 @@ install(TARGETS ${PROJECT_NAME} ) # Add the tests -add_subdirectory(tests) +if(BUILD_TESTS) + add_subdirectory(tests) +endif()