mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
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:
committed by
Mohammad Al-Turany
parent
ad0f050c99
commit
a26925cbf5
@@ -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");
|
||||
|
||||
|
Reference in New Issue
Block a user