FairMQ: Fix various errors from CI

* move Plugins::Version to fair::mq::tools
* fix Parser interface
* make device a shared pointer in main
* provide std::hash template specialization
* fix FairMQ.Plugins/FairMQ.PluginsStatic when run with ctest
* fix MQ/serialization example
* add --no-as-needed flag
* GCC 4 does not support member refs, move to pointer types
This commit is contained in:
Dennis Klein
2017-06-30 16:29:52 +02:00
committed by Mohammad Al-Turany
parent ad0f050c99
commit a26925cbf5
20 changed files with 153 additions and 104 deletions

View File

@@ -13,6 +13,7 @@
#include <options/FairMQProgOptions.h>
#include <FairMQLogger.h>
#include <fstream>
#include <memory>
#include <vector>
namespace
@@ -23,25 +24,25 @@ using namespace boost::filesystem;
using namespace boost::program_options;
using namespace std;
auto control(FairMQDevice& device) -> void
auto control(shared_ptr<FairMQDevice> device) -> void
{
device.SetTransport("zeromq");
device->SetTransport("zeromq");
for (const auto event : {
FairMQDevice::INIT_DEVICE,
FairMQDevice::RESET_DEVICE,
FairMQDevice::END,
}) {
device.ChangeState(event);
if (event != FairMQDevice::END) device.WaitForEndOfState(event);
device->ChangeState(event);
if (event != FairMQDevice::END) device->WaitForEndOfState(event);
}
}
TEST(PluginManager, LoadPlugin)
{
FairMQProgOptions config{};
FairMQDevice device{};
auto device = make_shared<FairMQDevice>();
auto mgr = PluginManager{};
mgr.EmplacePluginServices(config, device);
mgr.EmplacePluginServices(&config, device);
mgr.PrependSearchPath("./lib");