Dune Core Modules (2.9.1)

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 (C) 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
28#define DUNE_VERSION_JOIN(module,type) module ## _VERSION_ ## type
29
44#define DUNE_VERSION_EQUAL(module,major,minor) \
45 ((DUNE_VERSION_JOIN(module,MAJOR) == major) && \
46 (DUNE_VERSION_JOIN(module,MINOR) == minor))
47
62#define DUNE_VERSION_EQUAL_REV(module,major,minor,revision) \
63 ( DUNE_VERSION_EQUAL(module,major,minor) && \
64 (DUNE_VERSION_JOIN(module,REVISION) == revision))
65
80#define DUNE_VERSION_GTE(module,major,minor) \
81 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
82 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) >= minor)))
83
98#define DUNE_VERSION_LT(module,major,minor) \
99 ! DUNE_VERSION_GTE(module,major,minor)
100
116#define DUNE_VERSION_NEWER(module,major,minor) \
117 DUNE_VERSION_GTE(module,major,minor)
118
133#define DUNE_VERSION_GT(module,major,minor) \
134 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
135 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) > minor)))
136
151#define DUNE_VERSION_LTE(module,major,minor) \
152 ! DUNE_VERSION_GT(module,major,minor)
153
168#define DUNE_VERSION_GTE_REV(module,major,minor,revision) \
169 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
170 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) > minor)) \
171 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) == minor) \
172 && (DUNE_VERSION_JOIN(module,REVISION) >= revision)))
173
188#define DUNE_VERSION_LT_REV(module,major,minor,revision) \
189 ! DUNE_VERSION_GTE_REV(module,major,minor,revision)
190
206#define DUNE_VERSION_NEWER_REV(module,major,minor,revision) \
207 DUNE_VERSION_GTE_REV(module,major,minor,revision)
208
223#define DUNE_VERSION_GT_REV(module,major,minor,revision) \
224 ((DUNE_VERSION_JOIN(module,MAJOR) > major) \
225 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) > minor)) \
226 || ((DUNE_VERSION_JOIN(module,MAJOR) == major) && (DUNE_VERSION_JOIN(module,MINOR) == minor) \
227 && (DUNE_VERSION_JOIN(module,REVISION) > revision)))
228
243#define DUNE_VERSION_LTE_REV(module,major,minor,revision) \
244 ! DUNE_VERSION_GT_REV(module,major,minor,revision)
245
260#define DUNE_VERSION_ID(major,minor,revision) \
261 ((unsigned int)((major << 24) + (minor << 16) + revision))
262
277#define DUNE_MODULE_VERSION_ID(module) \
278 DUNE_VERSION_ID( DUNE_VERSION_JOIN(module,MAJOR), DUNE_VERSION_JOIN(module,MINOR), DUNE_VERSION_JOIN(module,REVISION) )
279
280#endif
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)