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/iobuffer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'zencore/iobuffer.cpp') diff --git a/zencore/iobuffer.cpp b/zencore/iobuffer.cpp index ee06f379e..bcecc768f 100644 --- a/zencore/iobuffer.cpp +++ b/zencore/iobuffer.cpp @@ -2,13 +2,14 @@ #include -#include -#include #include #include #include #include +#include #include + +#include #include #include @@ -382,6 +383,8 @@ IoBufferBuilder::MakeFromTemporaryFile(const wchar_t* FileName) ////////////////////////////////////////////////////////////////////////// +#if ZEN_WITH_TESTS + void iobuffer_forcelink() { @@ -394,4 +397,6 @@ TEST_CASE("IoBuffer") zen::IoBuffer buffer3(buffer2, 0, buffer2.Size()); } +#endif + } // namespace zen -- cgit v1.2.3