From 6586a59e63d089f38503656949d7aa8734ca8924 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 27 Nov 2017 23:59:42 +0300 Subject: Add support for build2 build --- odb/mysql/version-build2.hxx.in | 64 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 odb/mysql/version-build2.hxx.in (limited to 'odb/mysql/version-build2.hxx.in') diff --git a/odb/mysql/version-build2.hxx.in b/odb/mysql/version-build2.hxx.in new file mode 100644 index 0000000..56aba98 --- /dev/null +++ b/odb/mysql/version-build2.hxx.in @@ -0,0 +1,64 @@ +// file : odb/mysql/version-build2.hxx.in +// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef LIBODB_MYSQL_VERSION // Note: using the version macro itself. + +// Note: using build2 standard versioning scheme. The numeric version format +// is AAABBBCCCDDDE where: +// +// AAA - major version number +// BBB - minor version number +// CCC - bugfix version number +// DDD - alpha / beta (DDD + 500) version number +// E - final (0) / snapshot (1) +// +// When DDDE is not 0, 1 is subtracted from AAABBBCCC. For example: +// +// Version AAABBBCCCDDDE +// +// 0.1.0 0000010000000 +// 0.1.2 0000010010000 +// 1.2.3 0010020030000 +// 2.2.0-a.1 0020019990010 +// 3.0.0-b.2 0029999995020 +// 2.2.0-a.1.z 0020019990011 +// +#define LIBODB_MYSQL_VERSION $libodb-mysql.version.project_number$ULL +#define LIBODB_MYSQL_VERSION_STR "$libodb-mysql.version.project$" +#define LIBODB_MYSQL_VERSION_ID "$libodb-mysql.version.project_id$" + +#define LIBODB_MYSQL_VERSION_MAJOR $libodb-mysql.version.major$ +#define LIBODB_MYSQL_VERSION_MINOR $libodb-mysql.version.minor$ +#define LIBODB_MYSQL_VERSION_PATCH $libodb-mysql.version.patch$ + +#define LIBODB_MYSQL_PRE_RELEASE $libodb-mysql.version.pre_release$ + +#define LIBODB_MYSQL_SNAPSHOT $libodb-mysql.version.snapshot_sn$ULL +#define LIBODB_MYSQL_SNAPSHOT_ID "$libodb-mysql.version.snapshot_id$" + +#ifdef LIBODB_MYSQL_MARIADB +# include + +// We support MariaDB starting from 10.2.2 when the library started to be +// named as as mariadb, rather than mysqlclient. Before that we just don't +// distinguish it from the MySQL client library. +// +# if !defined(MYSQL_VERSION_ID) || MYSQL_VERSION_ID < 100202 +# error unexpected MariaDB version detected +# endif +#else +# include + +// Check that we have a compatible MySQL version (5.0.3 or later). +// +# if !defined(MYSQL_VERSION_ID) || MYSQL_VERSION_ID < 50003 +# error incompatible MySQL version detected +# endif +#endif + +#include + +$libodb.check(LIBODB_VERSION, LIBODB_SNAPSHOT)$ + +#endif // LIBODB_MYSQL_VERSION -- cgit v1.1