aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-02-27 14:47:13 -0800
committerGarrett D'Amore <garrett@damore.org>2018-02-28 07:11:41 -0800
commit65e01d3c7917983d5066335cffb84c93494f1b14 (patch)
tree618260276445adfd4c9d279d59248d780f93d23a /CMakeLists.txt
parentfeeec674529cf563f8507c307ae833dc93044664 (diff)
downloadnng-65e01d3c7917983d5066335cffb84c93494f1b14.tar.gz
nng-65e01d3c7917983d5066335cffb84c93494f1b14.tar.bz2
nng-65e01d3c7917983d5066335cffb84c93494f1b14.zip
fixes #240 nngcat is MIA
This is intended to provide compatibility with, and has been tested against, legacy nanocat. There are a few differences though. At this time support for the alias names (where argv[0] is set to something like nngreq or somesuch) is missing. By default this library operations without NNG_FLAG_NONBLOCK on dial and listen, so that failures here are immediately diagnosable. (This behavior can be changed with the --async flag.) By default --pair means PAIRv1, but you can specify --pair0 or --pair1 explicitly. (There is also a --compat mode, and in that mode --pair means PAIRv0. The --compat mode also turns on NNG_FLAG_NONBLOCK by default.) The "quoted" mode also quotes tabs. (Legacy nanocat did not.) It is possible to connect to *multiple* peers by using the --dial or --listen (or similar) options multiple times. Shorthands can be used for long options that are not ambiguous. For example, --surv can be used to mean surveyor, but --re is invalid because it can mean req, rep, or respondent. We assume you have a reasonable standard C environment. This won't work in embedded environments without support for FILE *. TLS options are missing but to be added soon. A man page is still to be written.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt56
1 files changed, 5 insertions, 51 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ece149a9..77b00f80 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -91,7 +91,7 @@ endif()
option (NNG_ENABLE_DOC "Enable building documentation." ON)
option (NNG_TESTS "Build and run tests" ON)
-option (NNG_TOOLS "Build extra tools" OFF)
+option (NNG_TOOLS "Build extra tools" ON)
option (NNG_ENABLE_NNGCAT "Enable building nngcat utility." ${NNG_TOOLS})
option (NNG_ENABLE_COVERAGE "Enable coverage reporting." OFF)
# Enable access to private APIs for our own use.
@@ -404,8 +404,7 @@ endif()
# Build the tools
if (NNG_ENABLE_NNGCAT)
- add_executable (nanocat tools/nngcat.c tools/options.c)
- target_link_libraries (nanocat ${PROJECT_NAME})
+ add_subdirectory (tools/nngcat)
endif ()
if (NNG_ENABLE_DOC)
@@ -456,59 +455,14 @@ if (NNG_ENABLE_DOC)
endmacro (add_libnng_man)
- if (NNG_ENABLE_NNGCAT)
- add_libnng_man (nngcat 1)
- endif ()
-
#add_libnng_man (nn_errno 3)
- #add_libnng_man (nn_strerror 3)
- #add_libnng_man (nn_symbol 3)
- #add_libnng_man (nn_symbol_info 3)
- #add_libnng_man (nn_allocmsg 3)
- #add_libnng_man (nn_reallocmsg 3)
- #add_libnng_man (nn_freemsg 3)
- #add_libnng_man (nn_socket 3)
- #add_libnng_man (nn_close 3)
- #add_libnng_man (nn_get_statistic 3)
- #add_libnng_man (nn_getsockopt 3)
- #add_libnng_man (nn_setsockopt 3)
- #add_libnng_man (nn_bind 3)
- #add_libnng_man (nn_connect 3)
- #add_libnng_man (nn_shutdown 3)
- #add_libnng_man (nn_send 3)
- #add_libnng_man (nn_recv 3)
- #add_libnng_man (nn_sendmsg 3)
- #add_libnng_man (nn_recvmsg 3)
- #add_libnng_man (nn_device 3)
- #add_libnng_man (nn_cmsg 3)
- #add_libnng_man (nn_poll 3)
- #add_libnng_man (nn_term 3)
#add_libnng_man (nanomsg 7)
- #add_libnng_man (nn_pair 7)
- #add_libnng_man (nn_reqrep 7)
- #add_libnng_man (nn_pubsub 7)
- #add_libnng_man (nn_survey 7)
- #add_libnng_man (nn_pipeline 7)
- #add_libnng_man (nn_bus 7)
- #add_libnng_man (nn_inproc 7)
- #add_libnng_man (nn_ipc 7)
- #add_libnng_man (nn_tcp 7)
- #add_libnng_man (nn_ws 7)
- #add_libnng_man (nn_env 7)
-
- add_custom_target (man ALL DEPENDS ${NNG_MANS})
- add_custom_target (html ALL DEPENDS ${NNG_HTMLS})
-
-endif ()
-#install (TARGETS LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-#install (TARGETS ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-#install (FILES src/nng.h DESTINATION include/nng)
+ #add_custom_target (man ALL DEPENDS ${NNG_MANS})
+ #add_custom_target (html ALL DEPENDS ${NNG_HTMLS})
-if (NNG_ENABLE_NNGCAT)
- install (TARGETS nngcat RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-endif()
+endif ()
set (CPACK_PACKAGE_NAME ${PROJECT_NAME})
set (CPACK_PACKAGE_VERSION ${NNG_PACKAGE_VERSION})