Dune Core Modules (2.10.0)

version.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5#ifndef DUNE_VERSION_HH
6#define DUNE_VERSION_HH
7
8#include <dune-common-config.hh> // DUNE_[MODULE]_VERSION_[TYPE]
9
30#define DUNE_VERSION_JOIN(module,type) module ## _VERSION_ ## type
31
46#define DUNE_VERSION_EQUAL(module,major,minor) \
47 ((DUNE_VERSION_JOIN(module,MAJOR) == major) && \
48 (DUNE_VERSION_JOIN(module,MINOR) == minor))
49
64#define DUNE_VERSION_EQUAL_REV(module,major,minor,revision) \
65 ( DUNE_VERSION_EQUAL(module,major,minor) && \
66 (DUNE_VERSION_JOIN(module,REVISION) == revision))
67
82#define DUNE_VERSION_GTE(module,major,minor) \
83 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
84 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) >= minor)))
85
100#define DUNE_VERSION_LT(module,major,minor) \
101 ! DUNE_VERSION_GTE(module,major,minor)
102
117#define DUNE_VERSION_GT(module,major,minor) \
118 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
119 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) > minor)))
120
135#define DUNE_VERSION_LTE(module,major,minor) \
136 ! DUNE_VERSION_GT(module,major,minor)
137
152#define DUNE_VERSION_GTE_REV(module,major,minor,revision) \
153 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
154 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) > minor)) \
155 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) == minor) \
156 && (DUNE_VERSION_JOIN(module,REVISION) >= revision)))
157
172#define DUNE_VERSION_LT_REV(module,major,minor,revision) \
173 ! DUNE_VERSION_GTE_REV(module,major,minor,revision)
174
189#define DUNE_VERSION_GT_REV(module,major,minor,revision) \
190 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
191 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) > minor)) \
192 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) == minor) \
193 && (DUNE_VERSION_JOIN(module,REVISION) > revision)))
194
209#define DUNE_VERSION_LTE_REV(module,major,minor,revision) \
210 ! DUNE_VERSION_GT_REV(module,major,minor,revision)
211
226#define DUNE_VERSION_ID(major,minor,revision) \
227 ((unsigned int)((major << 24) + (minor << 16) + revision))
228
243#define DUNE_MODULE_VERSION_ID(module) \
244 DUNE_VERSION_ID( DUNE_VERSION_JOIN(module,MAJOR), DUNE_VERSION_JOIN(module,MINOR), DUNE_VERSION_JOIN(module,REVISION) )
245
246#endif
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 27, 23:30, 2024)