mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31: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
39
fairmq/tools/Version.h
Normal file
39
fairmq/tools/Version.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/********************************************************************************
|
||||
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* *
|
||||
* This software is distributed under the terms of the *
|
||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||
* copied verbatim in the file "LICENSE" *
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef FAIR_MQ_TOOLS_VERSION_H
|
||||
#define FAIR_MQ_TOOLS_VERSION_H
|
||||
|
||||
#include <ostream>
|
||||
#include <tuple>
|
||||
|
||||
namespace fair
|
||||
{
|
||||
namespace mq
|
||||
{
|
||||
namespace tools
|
||||
{
|
||||
|
||||
struct Version
|
||||
{
|
||||
const int fkMajor, fkMinor, fkPatch;
|
||||
|
||||
friend auto operator< (const Version& lhs, const Version& rhs) -> bool { return std::tie(lhs.fkMajor, lhs.fkMinor, lhs.fkPatch) < std::tie(rhs.fkMajor, rhs.fkMinor, rhs.fkPatch); }
|
||||
friend auto operator> (const Version& lhs, const Version& rhs) -> bool { return rhs < lhs; }
|
||||
friend auto operator<=(const Version& lhs, const Version& rhs) -> bool { return !(lhs > rhs); }
|
||||
friend auto operator>=(const Version& lhs, const Version& rhs) -> bool { return !(lhs < rhs); }
|
||||
friend auto operator==(const Version& lhs, const Version& rhs) -> bool { return std::tie(lhs.fkMajor, lhs.fkMinor, lhs.fkPatch) == std::tie(rhs.fkMajor, rhs.fkMinor, rhs.fkPatch); }
|
||||
friend auto operator!=(const Version& lhs, const Version& rhs) -> bool { return !(lhs == rhs); }
|
||||
friend auto operator<<(std::ostream& os, const Version& v) -> std::ostream& { return os << v.fkMajor << "." << v.fkMinor << "." << v.fkPatch; }
|
||||
};
|
||||
|
||||
} /* namespace tools */
|
||||
} /* namespace mq */
|
||||
} /* namespace fair */
|
||||
|
||||
#endif /* FAIR_MQ_TOOLS_VERSION_H */
|
Reference in New Issue
Block a user