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/details/config.hxx | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'odb/mysql/details/config.hxx') diff --git a/odb/mysql/details/config.hxx b/odb/mysql/details/config.hxx index d29e9a5..f05044c 100644 --- a/odb/mysql/details/config.hxx +++ b/odb/mysql/details/config.hxx @@ -7,14 +7,25 @@ // no pre -#ifdef _MSC_VER -# if !defined(LIBODB_MYSQL_INCLUDE_SHORT) && !defined (LIBODB_MYSQL_INCLUDE_LONG) -# define LIBODB_MYSQL_INCLUDE_SHORT 1 -# endif -#elif defined(ODB_COMPILER) +#ifdef ODB_COMPILER # error libodb-mysql header included in odb-compiled header -#else -# include +#elif !defined(LIBODB_MYSQL_BUILD2) +# ifdef _MSC_VER +# include +# else +# include +# endif +#endif + +// LIBODB_MYSQL_BUILD2 macro can be defined either by the buildfile or by the +// included odb/mysql/details/config*.h (see above). +// +#ifdef LIBODB_MYSQL_BUILD2 +# ifdef LIBODB_MYSQL_INCLUDE_SHORT +# error mysql headers must be included with mysql/ prefix +# elif !defined(LIBODB_MYSQL_INCLUDE_LONG) +# define LIBODB_MYSQL_INCLUDE_LONG 1 +# endif #endif // no post -- cgit v1.1