From: Michael R. Crusoe Date: Wed, 13 Jan 2021 09:20:13 +0000 (+0100) Subject: build just the tests, as an option for autopkgtest later X-Git-Tag: archive/raspbian/1.3.2+dfsg-5+rpi1~1^2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=31febfaac229761b45d9c8428ee561811f17026f;p=libcereal.git build just the tests, as an option for autopkgtest later With assistance from Kevin D. Murray; thanks! Gbp-Pq: Name add-only-tests-target --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e4ffd72..9a53ff1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,8 @@ else() endif() +option(ONLY_TESTS "Don't build docs, or sandbox" OFF) + if(NOT CMAKE_VERSION VERSION_LESS 3.0) add_library(cereal INTERFACE) target_include_directories(cereal INTERFACE @@ -78,7 +80,8 @@ endif(Boost_FOUND) enable_testing() add_subdirectory(unittests) - -add_subdirectory(sandbox) +if(NOT ONLY_TEST) + add_subdirectory(sandbox) +endif(NOT ONLY_TEST) add_subdirectory(doc)