1/*
2 *
3 *  Copyright (c) 1991-2021 by the GMT Team (https://www.generic-mapping-tools.org/team.html)
4 *
5 * See LICENSE.TXT file for copying and redistribution conditions.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; version 3 or any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU Lesser General Public License for more details.
15 *
16 * Contact info: www.generic-mapping-tools.org
17 */
18
19#pragma once
20#ifndef GMT_VERSION_H_
21#define GMT_VERSION_H_
22
23#define GMT_MAJOR_VERSION @GMT_PACKAGE_VERSION_MAJOR@
24#define GMT_MINOR_VERSION @GMT_PACKAGE_VERSION_MINOR@
25#define GMT_RELEASE_VERSION @GMT_PACKAGE_VERSION_PATCH@
26#define GMT_VERSION_YEAR @GMT_VERSION_YEAR@
27#define GMT_VERSION_DOI "@GMT_VERSION_DOI@"
28#define GMT_VERSION_CITATION "@GMT_VERSION_CITATION@"
29
30#define GMT_STRING "@GMT_PACKAGE_VERSION_WITH_GIT_REVISION@"
31
32#ifdef __x86_64__
33#	define GMT_VER_64 " [64-bit]"
34#else
35#	if defined WIN32 && SIZEOF_VOID_P == 8
36#		define GMT_VER_64 " [64-bit]"
37#	else
38#		define GMT_VER_64 ""
39#	endif
40#endif
41
42#ifdef _OPENMP /* Open MP Parallelization is on */
43#	define GMT_MP " [MP]"
44#else
45#	define GMT_MP ""
46#endif
47
48#define GMT_VERSION GMT_version()
49#ifdef _WIN32
50	static _inline char *GMT_version () {
51#else
52	static inline char *GMT_version () {
53#endif
54		/* final string returned by GMT_version() */
55		static char version[] = GMT_STRING GMT_VER_64 GMT_MP;
56		return version;
57	}
58
59#endif /* !GMT_VERSION_H_ */
60