1 /*************************************************************************
3 * Copyright 2016 Realm Inc.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 **************************************************************************/
19 #ifndef REALM_VERSION_HPP
20 #define REALM_VERSION_HPP
24 // Do not use `cmakedefine` here, as certain versions can be 0, which CMake
25 // interprets as being undefined.
26 #define REALM_VERSION_MAJOR 5
27 #define REALM_VERSION_MINOR 1
28 #define REALM_VERSION_PATCH 2
29 #define REALM_VERSION_EXTRA ""
30 #define REALM_VERSION_STRING "5.1.2"
32 #define REALM_PRODUCT_NAME "realm-core"
33 #define REALM_VER_CHUNK "[" REALM_PRODUCT_NAME "-" REALM_VERSION_STRING "]"
46 static int get_major() { return REALM_VERSION_MAJOR; }
47 static int get_minor() { return REALM_VERSION_MINOR; }
48 static int get_patch() { return REALM_VERSION_PATCH; }
49 static StringData get_extra();
50 static std::string get_version();
51 static bool is_at_least(int major, int minor, int patch, StringData extra);
52 static bool is_at_least(int major, int minor, int patch);
53 static bool has_feature(Feature feature);
59 #endif // REALM_VERSION_HPP