diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-01-25 23:34:41 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-01-27 16:54:54 -0800 |
| commit | d6f0c13355199173dd7a2957dc2bae54bb5d85c3 (patch) | |
| tree | 92d70a3bfcad8896714dcbaa0930a21dd04605d1 /src/core | |
| parent | 463b2fe68fb55898d66a7d89064ad76c67083501 (diff) | |
| download | nng-d6f0c13355199173dd7a2957dc2bae54bb5d85c3.tar.gz nng-d6f0c13355199173dd7a2957dc2bae54bb5d85c3.tar.bz2 nng-d6f0c13355199173dd7a2957dc2bae54bb5d85c3.zip | |
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.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/buf_size_test.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/buf_size_test.c b/src/core/buf_size_test.c index b8757991..78678d66 100644 --- a/src/core/buf_size_test.c +++ b/src/core/buf_size_test.c @@ -10,15 +10,17 @@ #include <nuts.h> +#if NNG_ENABLE_COMPAT #include <nng/compat/nanomsg/nn.h> +#endif - void +void test_buffer_options(void) { nng_socket s1; int val; size_t sz; - char * opt; + char *opt; char *cases[] = { NNG_OPT_RECVBUF, @@ -62,8 +64,9 @@ test_buffer_options(void) void test_buffer_legacy(void) { +#if NNG_ENABLE_COMPAT nng_socket s1; - char * opt; + char *opt; char *cases[] = { NNG_OPT_RECVBUF, @@ -104,10 +107,13 @@ test_buffer_legacy(void) NUTS_TRUE(nn_errno() == EINVAL); } NUTS_PASS(nng_close(s1)); +#endif } NUTS_TESTS = { { "buffer options", test_buffer_options }, +#if NNG_ENABLE_COMPAT { "buffer legacy", test_buffer_legacy }, +#endif { NULL, NULL }, }; |
