diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-02-22 18:48:49 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-02-22 18:48:49 -0800 |
| commit | 1ba0631ca545a69488f4a60e051476fea067a154 (patch) | |
| tree | 009e8a0cde0b3bed8b61c0af221e9299ce724296 /src/supplemental/util/CMakeLists.txt | |
| parent | 6a344797283f05ac77e84be0312cf668f7953b6e (diff) | |
| download | nng-1ba0631ca545a69488f4a60e051476fea067a154.tar.gz nng-1ba0631ca545a69488f4a60e051476fea067a154.tar.bz2 nng-1ba0631ca545a69488f4a60e051476fea067a154.zip | |
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.
Diffstat (limited to 'src/supplemental/util/CMakeLists.txt')
| -rw-r--r-- | src/supplemental/util/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
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) |
