From 3f7561417bec08226bcfeb107d94be0dbf71b09e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 21 Dec 2019 10:20:55 -0800 Subject: fixes #1032 Figure out Darwin bustedness fixes #1035 Convey is awkward -- consider acutest.h This represents a rather large effort towards cleaning up our testing and optional configuration infrastructure. A separate test library is built by default, which is static, and includes some useful utilities design to make it easier to write shorter and more robust (not timing dependent) tests. This also means that we can cover pretty nearly all the tests (protocols etc.) in every case, even if the shipped image will be minimized. Subsystems which are optional can now use a few new macros to configure what they need see nng_sources_if, nng_headers_if, and nng_defines_if. This goes a long way to making the distributed CMakefiles a lot simpler. Additionally, tests for different parts of the tree can now be located outside of the tests/ tree, so that they can be placed next to the code that they are testing. Beyond the enabling work, the work has only begun, but these changes have resolved the most often failing tests for Darwin in the cloud. --- src/transport/inproc/CMakeLists.txt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/transport') diff --git a/src/transport/inproc/CMakeLists.txt b/src/transport/inproc/CMakeLists.txt index bab4cd7e..3249649e 100644 --- a/src/transport/inproc/CMakeLists.txt +++ b/src/transport/inproc/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2018 Staysail Systems, Inc. +# Copyright 2019 Staysail Systems, Inc. # Copyright 2018 Capitar IT Group BV # # This software is supplied under the terms of the MIT License, a @@ -12,10 +12,6 @@ option (NNG_TRANSPORT_INPROC "Enable inproc transport." ON) mark_as_advanced(NNG_TRANSPORT_INPROC) -if (NNG_TRANSPORT_INPROC) - set(_SRCS transport/inproc/inproc.c ${PROJECT_SOURCE_DIR}/include/nng/transport/inproc/inproc.h) - set(_DEFS -DNNG_TRANSPORT_INPROC) - - set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE) - set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE) -endif() +nng_sources_if(NNG_TRANSPORT_INPROC inproc.c) +nng_headers_if(NNG_TRANSPORT_INPROC nng/transport/inproc/inproc.h) +nng_defines_if(NNG_TRANSPORT_INPROC NNG_TRANSPORT_INPROC) -- cgit v1.2.3-70-g09d2