VersionInfo.h 3.35 KB
Newer Older
Andrea Valassi's avatar
Andrea Valassi committed
1
2
3
4
5
6
7
#ifndef COOLKERNEL_VERSIONINFO_H
#define COOLKERNEL_VERSIONINFO_H 1

// Explicitly disable COOL400 extensions (do not allow -D to enable them)
#undef COOL400 // COOL 2.x or COOL 3.x
#undef COOL400CPP11ENUM // API changes for c++11 enum class (bug #103344)

8
// These switches are now hardcoded in all branches of the code (bug #92204).
Andrea Valassi's avatar
Andrea Valassi committed
9
10
11
#define COOL300 1 // COOL 3.x
//#undef COOL300 // COOL 2.x

12
// These switches are now hardcoded in all branches of the code (bug #92204).
Andrea Valassi's avatar
Andrea Valassi committed
13
14
15
16
17
18
19
#define COOL290 1 // COOL 2.9.x or higher (COOL 2.8.x is no longer supported)

// COOL_VERSIONINFO_RELEASE is #defined in API as of COOL 2.8.4 (sr #111706)
// COOL_VERSIONINFO_RELEASE_x are #defined as of COOL 2.8.15
// Note that the former is defined within quotes, the latter are not!
#ifdef COOL300
#define COOL_VERSIONINFO_RELEASE_MAJOR 3
20
21
22
#define COOL_VERSIONINFO_RELEASE_MINOR 1
#define COOL_VERSIONINFO_RELEASE_PATCH 0
#define COOL_VERSIONINFO_RELEASE "3.1.0"
Andrea Valassi's avatar
Andrea Valassi committed
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
#else
#define COOL_VERSIONINFO_RELEASE_MAJOR 2
#define COOL_VERSIONINFO_RELEASE_MINOR 9
#define COOL_VERSIONINFO_RELEASE_PATCH 7
#define COOL_VERSIONINFO_RELEASE "2.9.7"
#endif

//---------------------------------------------------------------------------
// Enable COOL 2.9.x API extensions (COOL 2.9.x or COOL 3.x releases)
// Disable COOL 2.9.x API extensions (COOL 2.8.x releases)
//---------------------------------------------------------------------------
#ifdef COOL290
#define COOL290CO 1 // API fixes for Coverity (bugs #95363 and #95823)
#define COOL290EX 1 // API fixes in inlined Exception method (bug #68061)
#define COOL290VP 1 // API extension for vector payload (task #10335)
#else
#error("ERROR: COOL 2.8.x is no longer supported - no path to this statement!")
#endif

//---------------------------------------------------------------------------
// Enable COOL 3.x API changes (COOL 3.x releases)
// Disable COOL 3.x API changes (COOL 2.x releases)
//---------------------------------------------------------------------------
#ifdef COOL300
#define COOL300CPP11 1 // API changes replacing Boost by c++11 std
#define COOL_HAS_CPP11 1 // Also enable c++11 in the internal implementation
#define COOL300TS 1 // API use coral::TimeStamp in cool::Time
#define COOL300DP 1 // API remove previously deprecated calls
#else
#undef COOL300CPP11 // Do undef (do not leave the option to -D this explicitly)
#undef COOL_HAS_CPP11 // Disable c++11 in internal implementation (temporary?)
#undef COOL300TS // Do undef (do not leave the option to -D this explicitly)
#undef COOL300DP // Do undef (do not leave the option to -D this explicitly)
#endif

// Sanity check: does this compiler support c++11?
// NEW! c++11 is used in COOL internals even if COOL_HAS_CPP11 is not defined!
#if ( ! defined(__GXX_EXPERIMENTAL_CXX0X__) ) && (__cplusplus < 201103L )
#error("ERROR: COOL >= 2.9.7 but this compiler does not support c++11")
#endif

// Declare obsolete API calls as deprecated
// See http://stackoverflow.com/questions/295120/c-mark-as-deprecated
#ifdef COOL290
#if defined(__clang__) || defined(__GNUC__)
#define COOL_DEPRECATED(func) func __attribute__ ((deprecated))
#else
#error "ERROR: You need to implement COOL_DEPRECATED for this compiler"
#endif
#else
#error("ERROR: COOL 2.8.x is no longer supported - no path to this statement!")
#endif

// Drop support for TimingReport as of COOL 2.8.15 (task #31638)
#undef COOL_ENABLE_TIMING_REPORT

#endif // COOLKERNEL_VERSIONINFO_H