Remove compile time transport interface switch

- Remove the compile time check of the transport implementation.
  The transport (zeromq/nanomsg) can be chosen at run time with:
  `device.SetTransport("zeromq"); // possible values are "zeromq" and "nanomsg"`.

  For devices that use FairMQProgOptions, the transport can be configured via cmd option:
  `--transport zeromq` or `--transport nanomsg`. Default values is "zeromq".
  The device receives the configured value with:
  `device.SetTransport(config.GetValue<std::string>("transport"));`

  Old method of setting transport still works. But the NANOMSG constant is not defined.

- Remove old `fairmq/prototest` directory. It was only used as a test for protobuf.
  The protobuf part of Tutorial3 does the same (with different values).

- Fix a bug in FairMQPollerNN, where the `revents` value was not initialized.
  This caused the `poller->CheckOutput()` to trigger when it should not.
This commit is contained in:
Alexey Rybalchenko
2016-01-13 17:21:24 +01:00
parent 0e1a1ad552
commit f1abb9ecdd
41 changed files with 162 additions and 1634 deletions

View File

@@ -8,9 +8,6 @@
configure_file(${CMAKE_SOURCE_DIR}/fairmq/run/startBenchmark.sh.in ${CMAKE_BINARY_DIR}/bin/startBenchmark.sh)
configure_file(${CMAKE_SOURCE_DIR}/fairmq/run/benchmark.json ${CMAKE_BINARY_DIR}/bin/config/benchmark.json)
# following scripts are only for protobuf tests and are not essential part of FairMQ
# configure_file(${CMAKE_SOURCE_DIR}/examples/advanced/Tutorial3/MQ/run/startBin.sh.in ${CMAKE_BINARY_DIR}/bin/startBin.sh)
# configure_file(${CMAKE_SOURCE_DIR}/examples/advanced/Tutorial3/MQ/run/startProto.sh.in ${CMAKE_BINARY_DIR}/bin/startProto.sh)
add_subdirectory(logger)
add_subdirectory(test)
@@ -30,19 +27,8 @@ Set(SYSTEM_INCLUDE_DIRECTORIES
${ZMQ_INCLUDE_DIR}
)
If(PROTOBUF_FOUND)
Set(INCLUDE_DIRECTORIES
${INCLUDE_DIRECTORIES}
# following directory is only for protobuf tests and is not essential part of FairMQ
# ${CMAKE_SOURCE_DIR}/fairmq/prototest
)
Set(SYSTEM_INCLUDE_DIRECTORIES
${SYSTEM_INCLUDE_DIRECTORIES}
${PROTOBUF_INCLUDE_DIR}
)
EndIf(PROTOBUF_FOUND)
If(NANOMSG_FOUND)
add_definitions(-DNANOMSG_FOUND)
Set(INCLUDE_DIRECTORIES
${INCLUDE_DIRECTORIES}
${CMAKE_SOURCE_DIR}/fairmq/nanomsg
@@ -91,31 +77,6 @@ Set(SRCS
"options/FairMQParser.cxx"
)
If(PROTOBUF_FOUND)
# following source files are only for protobuf tests and are not essential part of FairMQ
# add_custom_command(
# OUTPUT
# ${CMAKE_CURRENT_BINARY_DIR}/payload.pb.h
# ${CMAKE_CURRENT_BINARY_DIR}/payload.pb.cc
# COMMAND
# ${SIMPATH}/bin/protoc -I=. --cpp_out=${CMAKE_CURRENT_BINARY_DIR} payload.proto
# WORKING_DIRECTORY
# ${CMAKE_SOURCE_DIR}/fairmq/prototest
# )
# set(SRCS
# ${SRCS}
# ${CMAKE_CURRENT_BINARY_DIR}/payload.pb.cc
# "prototest/FairMQProtoSampler.cxx"
# "prototest/FairMQBinSampler.cxx"
# "prototest/FairMQBinSink.cxx"
# "prototest/FairMQProtoSink.cxx"
# )
Set(DEPENDENCIES
${DEPENDENCIES}
${PROTOBUF_LIBRARY}
)
Endif(PROTOBUF_FOUND)
If(NANOMSG_FOUND)
Set(SRCS
${SRCS}
@@ -124,12 +85,9 @@ If(NANOMSG_FOUND)
"nanomsg/FairMQSocketNN.cxx"
"nanomsg/FairMQPollerNN.cxx"
)
Set(DEPENDENCIES
${DEPENDENCIES}
${NANOMSG_LIBRARY_SHARED}
)
EndIf(NANOMSG_FOUND)
# to copy src that are header-only files (e.g. c++ template) for FairRoot external installation
# manual install (globbing add not recommended)
Set(FAIRMQHEADERS
@@ -163,6 +121,13 @@ Set(DEPENDENCIES
boost_regex
)
If(NANOMSG_FOUND)
Set(DEPENDENCIES
${DEPENDENCIES}
${NANOMSG_LIBRARY_SHARED}
)
EndIf(NANOMSG_FOUND)
Set(LIBRARY_NAME FairMQ)
GENERATE_LIBRARY()
@@ -176,17 +141,6 @@ Set(Exe_Names
proxy
)
# following executables are only for protobuf tests and are not essential part of FairMQ
# if(PROTOBUF_FOUND)
# set(Exe_Names
# ${Exe_Names}
# binsampler
# protosampler
# binsink
# protosink
# )
# endif(PROTOBUF_FOUND)
Set(Exe_Source
run/runBenchmarkSampler.cxx
run/runSink.cxx
@@ -196,17 +150,6 @@ Set(Exe_Source
run/runProxy.cxx
)
# following source files are only for protobuf tests and are not essential part of FairMQ
# if(PROTOBUF_FOUND)
# set(Exe_Source
# ${Exe_Source}
# prototest/runBinSampler.cxx
# prototest/runProtoSampler.cxx
# prototest/runBinSink.cxx
# prototest/runProtoSink.cxx
# )
# endif(PROTOBUF_FOUND)
list(LENGTH Exe_Names _length)
math(EXPR _length ${_length}-1)