Skip to content
Snippets Groups Projects
Commit 61984077 authored by Jonathan Hanks's avatar Jonathan Hanks
Browse files

Forward port r4601. Vendor a copy of the zmq c++ bindings

Also adjusts the build system to use the vendored copy of the zmq
bindings if the zmq.hpp file cannot be found.


git-svn-id: https://redoubt.ligo-wa.caltech.edu/svn/advLigoRTS/trunk@4616 6dcd42c9-f523-4c6d-aada-af552506706e
parent e9580259
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,14 @@ if (LibZMQ_FOUND)
add_library(_zmq4_intl INTERFACE)
target_include_directories(_zmq4_intl INTERFACE ${LibZMQ_INCLUDE_DIRS})
target_link_libraries(_zmq4_intl INTERFACE _zmq4)
find_file(_zmq4_hpp zmq.hpp
PATHS ${libZMQ_INCLUDE_DIRS})
if (NOT ${_zmq4_hpp})
target_include_directories(_zmq4_intl INTERFACE ${PROJECT_SOURCE_DIR}/src/include/thirdparty/zmq)
message("Adding ${PROJECT_SOURCE_DIR}/src/include/thirdparty/zmq to the include list for zmq4")
endif(NOT ${_zmq4_hpp})
# Give the interface library a nice name for exporting
add_library(zmq4::zmq ALIAS _zmq4_intl)
endif(LibZMQ_FOUND)
......
......@@ -166,7 +166,7 @@ sockutil.o: ${GDS_ARCHIVE}/sockutil.c
$(CC) -c -D_TP_DAQD -D_TESTPOINT_DIRECT=0 $<
run_number_client.o: ${RUN_NUMBER_ARCHIVE}/run_number_client.cc
$(CXX) -c ${CXXFLAGS} $<
$(CXX) -c ${CXXFLAGS} -I$(srcdir)/@ZMQ_INCLUDES@ $<
# -DNDEBUG is killing Channel Access server code (Epics R3.14.4)
......
......@@ -35,9 +35,21 @@ AC_CHECK_HEADERS(FlexLexer.h arpa/inet.h assert.h ctype.h \
errno.h fcntl.h fstream.h iostream.h limits.h math.h \
netinet/in.h pthread.h signal.h stdio.h stdlib.h stream.h \
string.h sys/socket.h sys/types.h time.h unistd.h tnf/probe.h \
regex.h regexp.h)
regex.h regexp.h zmq.h)
AC_HEADER_TIME
dnl check for zmq c++ wrapper
dnl =========================
AC_LANG_PUSH([C++])
AC_CHECK_HEADER(zmq.hpp, [HAVE_ZMQ_HPP=1], [HAVE_ZMQ_HPP=0])
AC_LANG_POP([C++])
ZMQ_INCLUDES=
AS_IF([test "$HAVE_ZMQ_HPP" = "0"], [
ZMQ_INCLUDES="../include/thirdparty/zmq"
])
AC_SUBST(ZMQ_INCLUDES)
dnl checks for typedefs
dnl ===================
......
This diff is collapsed.
......@@ -21,11 +21,11 @@ else(${HAS_CXX_11})
endif (${HAS_CXX_11})
add_executable(run_number_server run_number_main.cc run_number.cc run_number.hh)
target_link_libraries(run_number_server PUBLIC zmq)
target_link_libraries(run_number_server PUBLIC zmq4::zmq)
target_compile_options(run_number_server PRIVATE ${_RN_CHECK_FLAGS})
add_library(run_number_client STATIC run_number_client.cc run_number_client.hh)
target_link_libraries(run_number_client PUBLIC zmq)
target_link_libraries(run_number_client PUBLIC zmq4::zmq)
target_include_directories(run_number_client PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
add_library(run_number::run_number ALIAS run_number_client)
......
......@@ -21,13 +21,12 @@ target_compile_options(zmq_multi_stream PUBLIC -std=gnu99)
add_executable(zmq_threads zmq_threads.c)
target_link_libraries(zmq_threads PUBLIC zmq ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(zmq_threads PUBLIC zmq4::zmq ${CMAKE_THREAD_LIBS_INIT})
target_compile_options(zmq_threads PUBLIC -std=gnu99)
add_executable(zmq_dc zmq_dc.cc)
target_link_libraries(zmq_dc PUBLIC zmq_dc_recv zmq ${CMAKE_THREAD_LIBS_INIT})
target_compile_options(zmq_dc PUBLIC)
target_requires_cpp11(zmq_dc PUBLIC)
target_link_libraries(zmq_dc PUBLIC zmq_dc_recv zmq4::zmq ${CMAKE_THREAD_LIBS_INIT})
target_compile_options(zmq_dc PUBLIC "-std=c++11")
add_executable(zmq_proxy zmq_proxy.c)
target_link_libraries(zmq_proxy PUBLIC zmq4::zmq)
......@@ -53,4 +52,4 @@ target_link_libraries(zmq_daq_test_data_firehose_recv PUBLIC zmq4::zmq)
target_requires_cpp11(zmq_daq_test_data_firehose_recv PUBLIC)
#target_compile_features(zmq_daq_test_data_firehose_recv PUBLIC cxx_defaulted_functions)
install(TARGETS zmq_multi_stream zmq_dc DESTINATION bin)
\ No newline at end of file
install(TARGETS zmq_multi_stream zmq_dc DESTINATION bin)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment