@@ -98,9 +98,9 @@ endif()
98
98
option (NN_STATIC_LIB "Build static library instead of shared library." OFF )
99
99
option (NN_ENABLE_DOC "Enable building documentation." ON )
100
100
option (NN_ENABLE_GETADDRINFO_A "Enable/disable use of getaddrinfo_a in place of getaddrinfo." ON )
101
- option (NN_TESTS "Build and run nanomsg tests" ON )
102
- option (NN_TOOLS "Build nanomsg tools" ON )
103
- option (NN_ENABLE_NANOCAT "Enable building nanocat utility." ${NN_TOOLS} )
101
+ option (NN_TESTS "Build and run nanomsg tests" OFF )
102
+ option (NN_TOOLS "Build nanomsg tools" OFF )
103
+
104
104
105
105
# Platform checks.
106
106
@@ -241,10 +241,6 @@ add_subdirectory (src)
241
241
242
242
# Build the tools
243
243
244
- if (NN_ENABLE_NANOCAT)
245
- add_executable (nanocat tools/nanocat.c tools/options .c)
246
- target_link_libraries (nanocat ${PROJECT_NAME} )
247
- endif ()
248
244
249
245
if (NN_ENABLE_DOC)
250
246
find_program (ASCIIDOCTOR_EXE asciidoctor)
@@ -293,9 +289,6 @@ if (NN_ENABLE_DOC)
293
289
294
290
endmacro (add_libnanomsg_man)
295
291
296
- if (NN_ENABLE_NANOCAT)
297
- add_libnanomsg_man (nanocat 1)
298
- endif ()
299
292
300
293
add_libnanomsg_man (nn_errno 3)
301
294
add_libnanomsg_man (nn_strerror 3)
@@ -341,108 +334,13 @@ endif ()
341
334
342
335
# Build unit tests.
343
336
344
- if (NN_TESTS)
345
-
346
- enable_testing ()
347
- set (all_tests "" )
348
-
349
- set (TEST_PORT 12100)
350
- macro (add_libnanomsg_test NAME TIMEOUT )
351
- list (APPEND all_tests ${NAME} )
352
- add_executable (${NAME} tests/${NAME} .c)
353
- target_link_libraries (${NAME} ${PROJECT_NAME} )
354
- add_test (NAME ${NAME} COMMAND ${NAME} ${TEST_PORT} )
355
- set_tests_properties (${NAME} PROPERTIES TIMEOUT ${TIMEOUT} )
356
- math (EXPR TEST_PORT "${TEST_PORT} +10" )
357
- endmacro (add_libnanomsg_test)
358
-
359
- # Transport tests.
360
- add_libnanomsg_test (inproc 5)
361
- add_libnanomsg_test (inproc_shutdown 5)
362
- add_libnanomsg_test (ipc 5)
363
- add_libnanomsg_test (ipc_shutdown 30)
364
- add_libnanomsg_test (ipc_stress 5)
365
- add_libnanomsg_test (tcp 5)
366
- add_libnanomsg_test (tcp_shutdown 120)
367
- add_libnanomsg_test (ws 5)
368
-
369
- # Protocol tests.
370
- add_libnanomsg_test (pair 5)
371
- add_libnanomsg_test (pubsub 5)
372
- add_libnanomsg_test (reqrep 5)
373
- add_libnanomsg_test (pipeline 5)
374
- add_libnanomsg_test (survey 5)
375
- add_libnanomsg_test (bus 5)
376
-
377
- # Feature tests.
378
- add_libnanomsg_test (async_shutdown 30)
379
- add_libnanomsg_test (block 5)
380
- add_libnanomsg_test (term 5)
381
- add_libnanomsg_test (timeo 5)
382
- add_libnanomsg_test (iovec 5)
383
- add_libnanomsg_test (msg 5)
384
- add_libnanomsg_test (prio 5)
385
- add_libnanomsg_test (poll 5)
386
- add_libnanomsg_test (device 5)
387
- add_libnanomsg_test (device4 5)
388
- add_libnanomsg_test (device5 5)
389
- add_libnanomsg_test (device6 5)
390
- add_libnanomsg_test (device7 30)
391
- add_libnanomsg_test (emfile 5)
392
- add_libnanomsg_test (domain 5)
393
- add_libnanomsg_test (trie 5)
394
- add_libnanomsg_test (list 5)
395
- add_libnanomsg_test (hash 5)
396
- add_libnanomsg_test (stats 5)
397
- add_libnanomsg_test (symbol 5)
398
- add_libnanomsg_test (separation 5)
399
- add_libnanomsg_test (zerocopy 5)
400
- add_libnanomsg_test (shutdown 5)
401
- add_libnanomsg_test (cmsg 5)
402
- add_libnanomsg_test (bug328 5)
403
- add_libnanomsg_test (bug777 5)
404
- add_libnanomsg_test (ws_async_shutdown 5)
405
- add_libnanomsg_test (reqttl 10)
406
- add_libnanomsg_test (surveyttl 10)
407
-
408
- # Platform-specific tests
409
- if (WIN32 )
410
- add_libnanomsg_test (win_sec_attr 5)
411
- endif ()
412
-
413
- # Build the performance tests.
414
337
415
- macro (add_libnanomsg_perf NAME )
416
- add_executable (${NAME} perf/${NAME} .c)
417
- target_link_libraries (${NAME} ${PROJECT_NAME} )
418
- endmacro (add_libnanomsg_perf)
419
-
420
- add_libnanomsg_perf (inproc_lat)
421
- add_libnanomsg_perf (inproc_thr)
422
- add_libnanomsg_perf (local_lat)
423
- add_libnanomsg_perf (remote_lat)
424
- add_libnanomsg_perf (local_thr)
425
- add_libnanomsg_perf (remote_thr)
426
-
427
- endif ()
428
338
429
339
install (TARGETS LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
430
340
install (TARGETS ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} )
431
341
install (FILES src/nn.h DESTINATION include /nanomsg)
432
- install (FILES src/inproc.h DESTINATION include /nanomsg)
433
- install (FILES src/ipc.h DESTINATION include /nanomsg)
434
342
install (FILES src/tcp.h DESTINATION include /nanomsg)
435
- install (FILES src/ws.h DESTINATION include /nanomsg)
436
- install (FILES src/pair.h DESTINATION include /nanomsg)
437
- install (FILES src/pubsub.h DESTINATION include /nanomsg)
438
- install (FILES src/reqrep.h DESTINATION include /nanomsg)
439
343
install (FILES src/pipeline.h DESTINATION include /nanomsg)
440
- install (FILES src/survey.h DESTINATION include /nanomsg)
441
- install (FILES src/bus.h DESTINATION include /nanomsg)
442
-
443
- if (NN_ENABLE_NANOCAT)
444
- install (TARGETS nanocat RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
445
- endif ()
446
344
447
345
set (CPACK_PACKAGE_NAME ${PROJECT_NAME} )
448
346
set (CPACK_PACKAGE_VERSION ${NN_PACKAGE_VERSION} )
0 commit comments