From d6f0c13355199173dd7a2957dc2bae54bb5d85c3 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 25 Jan 2024 23:34:41 -0800 Subject: New CMAKE option NNG_ENABLE_COMPAT (defaults ON) This option allows the compatibility code to be elided from the build. This saves build time, and eliminates bloat from a static library when used strictly in native NNG mode. --- cmake/NNGOptions.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmake') diff --git a/cmake/NNGOptions.cmake b/cmake/NNGOptions.cmake index 6335fc63..abb3f03d 100644 --- a/cmake/NNGOptions.cmake +++ b/cmake/NNGOptions.cmake @@ -39,6 +39,11 @@ option(NNG_ENABLE_COVERAGE "Enable coverage reporting." OFF) # for the public library. option(NNG_ELIDE_DEPRECATED "Elide deprecated functionality." OFF) +# Turning off the compatibility layer can save some space, and +# compilation time, but may break legacy applications It should +# be left enabled when building a shared library. +option(NNG_ENABLE_COMPAT "Enable legacy nanomsg API." ON) + option(NNG_ENABLE_STATS "Enable statistics." ON) mark_as_advanced(NNG_ENABLE_STATS) -- cgit v1.2.3-70-g09d2