CMakeLists.txt 2.16 KB
Newer Older
1 2 3 4 5 6 7 8 9
# CMake build script for ZeroMQ tests

set(tests
        test_system
        test_pair_inproc
        test_pair_tcp
        test_reqrep_inproc
        test_reqrep_tcp
        test_hwm
10
        test_hwm_pubsub
11 12 13 14
        test_reqrep_device
        test_sub_forward
        test_invalid_rep
        test_msg_flags
15
        test_msg_ffn
16 17 18 19 20 21 22 23 24 25
        test_connect_resolve
        test_immediate
        test_last_endpoint
        test_term_endpoint
        test_router_mandatory
        test_probe_router
        test_stream
        test_stream_empty
        test_stream_disconnect
        test_disconnect_inproc
Dylan Cali's avatar
Dylan Cali committed
26 27
        test_unbind_inproc
        test_unbind_wildcard
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
        test_ctx_options
        test_ctx_destroy
        test_security_null
        test_security_plain
        test_security_curve
        test_iov
        test_spec_req
        test_spec_rep
        test_spec_dealer
        test_spec_router
        test_spec_pushpull
        test_req_correlate
        test_req_relaxed
        test_conflate
        test_inproc_connect
        test_issue_566
        test_shutdown_stress
        test_timeo
        test_many_sockets
        test_diffserv
        test_connect_rid
49
        test_xpub_nodrop
50
        test_pub_invert_matching
51 52
        test_thread_safe
        test_client_server
53
	test_sockopt_hwm
Jonathan Reams's avatar
Jonathan Reams committed
54
        test_heartbeats
55
        test_thread_safe_polling
56 57 58 59 60 61 62 63
)
if(NOT WIN32)
  list(APPEND tests
          test_monitor
          test_pair_ipc
          test_reqrep_ipc
          test_abstract_ipc
          test_proxy
64
          test_proxy_single_socket
65
          test_proxy_terminate
66
          test_getsockopt_memset
67 68 69 70 71 72 73 74
          test_filter_ipc
  )
  if(HAVE_FORK)
    list(APPEND tests test_fork)
  endif()
endif()

foreach(test ${tests})
Doron Somech's avatar
Doron Somech committed
75 76
  add_executable(${test} ${test}.cpp)
  target_link_libraries(${test} libzmq)
77 78

  if(RT_LIBRARY)
Doron Somech's avatar
Doron Somech committed
79
    target_link_libraries(${test} ${RT_LIBRARY} )
80 81
  endif()
  if(WIN32)
Doron Somech's avatar
Doron Somech committed
82
    add_test(NAME ${test} WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH} COMMAND ${test})
83
  else()
Doron Somech's avatar
Doron Somech committed
84
    add_test(NAME ${test} COMMAND ${test})
85 86 87 88 89 90 91 92 93
  endif()
endforeach()

if(NOT WIN32)
  if(NOT CMAKE_SYSTEM_NAME MATCHES "Linux")
    set_tests_properties(test_abstract_ipc PROPERTIES WILL_FAIL true)
  endif()
endif()