From 8d3024a7e09246e44bf6d9ea14a36e6b03032e85 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 20 Sep 2021 10:15:12 +0200 Subject: It's not possible to compile out tests Tests are now compiled in if `ZEN_WITH_TESTS=1`, and compiled out if not. Compiling tests out reduces the footprint of the resulting executables quite significantly. --- zencore/compactbinarybuilder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'zencore/compactbinarybuilder.cpp') diff --git a/zencore/compactbinarybuilder.cpp b/zencore/compactbinarybuilder.cpp index 08f37a23d..fa5b6a69b 100644 --- a/zencore/compactbinarybuilder.cpp +++ b/zencore/compactbinarybuilder.cpp @@ -7,12 +7,11 @@ #include #include #include +#include #define _USE_MATH_DEFINES #include -#include - namespace zen { template @@ -700,6 +699,7 @@ operator<<(CbWriter& Writer, const TimeSpan Value) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#if ZEN_WITH_TESTS void usonbuilder_forcelink() { @@ -1534,5 +1534,6 @@ TEST_CASE("usonbuilder.stream") CHECK(ValidateCompactBinary(Object.GetBuffer(), CbValidateMode::All) == CbValidateError::None); } } +#endif } // namespace zen -- cgit v1.2.3