From 1ba0631ca545a69488f4a60e051476fea067a154 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 22 Feb 2018 18:48:49 -0800 Subject: Add nng_opts_parse() API for handling command line options. We have implemented this alternative to getopt() so that we can create nngcat. The reason we did not just use getopt() is that getopt() does not understand long options (which nanocat uses, and we want to preserve for compatibility) and getopt() is not available on Windows (and possibly other non-POSIX platforms.) This function handles long and short options, but does not have support for option clustering. It also is threadsafe & reentrant, unlike getopt. --- src/supplemental/util/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/supplemental/util/CMakeLists.txt') diff --git a/src/supplemental/util/CMakeLists.txt b/src/supplemental/util/CMakeLists.txt index 443473d6..f94e2b45 100644 --- a/src/supplemental/util/CMakeLists.txt +++ b/src/supplemental/util/CMakeLists.txt @@ -8,8 +8,8 @@ # found online at https://opensource.org/licenses/MIT. # -set(SUPP_PLATFORM_SOURCES supplemental/util/platform.c) -set(SUPP_PLATFORM_HEADERS supplemental/util/platform.h) +set(SUPP_UTIL_SOURCES supplemental/util/options.c supplemental/util/platform.c) +set(SUPP_UTIL_HEADERS supplemental/util/options.h supplemental/util/platform.h) -set(NNG_SOURCES ${NNG_SOURCES} ${SUPP_PLATFORM_SOURCES} PARENT_SCOPE) -set(NNG_HEADERS ${NNG_HEADERS} ${SUPP_PLATFORM_HEADERS} PARENT_SCOPE) +set(NNG_SOURCES ${NNG_SOURCES} ${SUPP_UTIL_SOURCES} PARENT_SCOPE) +set(NNG_HEADERS ${NNG_HEADERS} ${SUPP_UTIL_HEADERS} PARENT_SCOPE) -- cgit v1.2.3-70-g09d2