-
Notifications
You must be signed in to change notification settings - Fork 0
/
version.h.in.cmake
129 lines (109 loc) · 4.71 KB
/
version.h.in.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/** @file version.h
* @brief Define preprocessor symbols for the library version
*/
// Copyright (C) 2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2015,2016,2017,2018 Olly Betts
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef XAPIAN_INCLUDED_VERSION_H
#define XAPIAN_INCLUDED_VERSION_H
#ifdef __GNUC__
#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ == 0)
#error Xapian no longer supports GCC < 3.1
#else
#if !defined(__GXX_ABI_VERSION) || __GXX_ABI_VERSION != 1011
#if defined __GXX_ABI_VERSION && __GXX_ABI_VERSION >= 1002
#warning The C++ ABI version of compiler you are using does not exactly match
#warning that of the compiler used to build the library. If linking fails
#warning due to missing symbols, this is probably the reason why.
#warning The Xapian library was built with g++ 7.3.0
#else
#error The C++ ABI version of compiler you are using does not match
#error that of the compiler used to build the library. The versions
#error must match or your program will not work correctly.
#error The Xapian library was built with g++ 7.3.0
#endif
#endif
#ifdef _GLIBCXX_DEBUG
#error You are compiling with _GLIBCXX_DEBUG defined, but the library
#error was not compiled with this flag. The settings must match or your
#error program will not work correctly.
#endif
#endif
#endif
/// The library was compiled with GCC's -fvisibility=hidden option.
#cmakedefine XAPIAN_ENABLE_VISIBILITY
/// The version of Xapian as a C string literal.
#cmakedefine XAPIAN_VERSION @XAPIAN_VERSION@
/** The major component of the Xapian version.
* E.g. for Xapian 1.0.14 this would be: 1
*/
#cmakedefine XAPIAN_MAJOR_VERSION @XAPIAN_MAJOR_VERSION@
/** The minor component of the Xapian version.
* E.g. for Xapian 1.0.14 this would be: 0
*/
#cmakedefine XAPIAN_MINOR_VERSION @XAPIAN_MINOR_VERSION@
/** The revision component of the Xapian version.
* E.g. for Xapian 1.0.14 this would be: 14
*/
#cmakedefine XAPIAN_REVISION @XAPIAN_REVISION@
/// Base (signed) type for Xapian::docid and related types.
#cmakedefine XAPIAN_DOCID_BASE_TYPE @XAPIAN_DOCID_BASE_TYPE@
/// Base (signed) type for Xapian::termcount and related types.
#cmakedefine XAPIAN_TERMCOUNT_BASE_TYPE @XAPIAN_TERMCOUNT_BASE_TYPE@
/// Base (signed) type for Xapian::termpos.
#cmakedefine XAPIAN_TERMPOS_BASE_TYPE @XAPIAN_TERMPOS_BASE_TYPE@ // int
/// Type for returning total document length.
#cmakedefine XAPIAN_TOTALLENGTH_TYPE @XAPIAN_TOTALLENGTH_TYPE@
/// Underlying type for Xapian::rev.
#cmakedefine XAPIAN_REVISION_TYPE @XAPIAN_REVISION_TYPE@
/// XAPIAN_HAS_CHERT_BACKEND Defined if the chert backend is enabled.
#cmakedefine XAPIAN_HAS_CHERT_BACKEND
/// XAPIAN_HAS_GLASS_BACKEND Defined if the glass backend is enabled.
#cmakedefine XAPIAN_HAS_GLASS_BACKEND
/// XAPIAN_HAS_INMEMORY_BACKEND Defined if the inmemory backend is enabled.
#cmakedefine XAPIAN_HAS_INMEMORY_BACKEND
/// XAPIAN_HAS_REMOTE_BACKEND Defined if the remote backend is enabled.
#cmakedefine XAPIAN_HAS_REMOTE_BACKEND
/// XAPIAN_AT_LEAST(A,B,C) checks for xapian-core >= A.B.C - use like so:
///
/// @code
/// #if XAPIAN_AT_LEAST(1,4,2)
/// /* Code needing features needing Xapian >= 1.4.2. */
/// #endif
/// @endcode
///
/// Added in Xapian 1.4.2.
#define XAPIAN_AT_LEAST(A,B,C) \
(XAPIAN_MAJOR_VERSION > (A) || \
(XAPIAN_MAJOR_VERSION == (A) && \
(XAPIAN_MINOR_VERSION > (B) || \
(XAPIAN_MINOR_VERSION == (B) && XAPIAN_REVISION >= (C)))))
/// We support move semantics when we're confident the compiler supports it.
///
/// C++11 move semantics are very useful in threaded code that wants to
/// hand-off Xapian objects to worker threads, but in this case it's very
/// unhelpful for availability of these semantics to vary by compiler as it
/// quietly leads to a build with non-threadsafe behaviour.
///
/// User code can #define XAPIAN_MOVE_SEMANTICS to force this on, and will
/// then get a compilation failure if the compiler lacks suitable support.
#ifndef XAPIAN_MOVE_SEMANTICS
# if __cplusplus >= 201103L || \
(defined _MSC_VER && _MSC_VER >= 1900) || \
defined XAPIAN_LIB_BUILD
# define XAPIAN_MOVE_SEMANTICS
# endif
#endif
#endif /* XAPIAN_INCLUDED_VERSION_H */