VersionInfo.h 3.48 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
#define COOL290 1 // COOL 2.9.x or higher (COOL 2.8.x is no longer supported)

15
16
17
18
19
20
// This switch is now hardcoded in all supported branches (CORALCOOL-2808), 
// i.e. COOL 2.9.x or higher (COOL 2.8.x is no longer supported).
// NEW! c++11 is used in COOL internals even if COOL_HAS_CPP11 is not defined!
// TODO: eventually, remove COOL_HAS_CPP11 completely (CORALCOOL-2809)
#define COOL_HAS_CPP11 1

Andrea Valassi's avatar
Andrea Valassi committed
21
22
23
24
25
// 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
26
#define COOL_VERSIONINFO_RELEASE_MINOR 1
Andrea Valassi's avatar
Andrea Valassi committed
27
28
#define COOL_VERSIONINFO_RELEASE_PATCH 5
#define COOL_VERSIONINFO_RELEASE "3.1.5"
Andrea Valassi's avatar
Andrea Valassi committed
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#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
53
#define COOL300CPP11 1 // KEPT BUT NO LONGER NEEDED CORALCOOL-2943
54
55
#define COOL300TS 1 // KEPT BUT NO LONGER NEEDED CORALCOOL-2943
#define COOL300DP 1 // KEPT BUT NO LONGER NEEDED CORALCOOL-2943
Andrea Valassi's avatar
Andrea Valassi committed
56
57
58
59
60
61
#else
#undef COOL300CPP11 // Do undef (do not leave the option to -D this explicitly)
#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

62
63
// Sanity check: does this compiler support c++11? (see CORALCOOL-2808)
#ifdef COOL300CPP11
Andrea Valassi's avatar
Andrea Valassi committed
64
#if ( ! defined(__GXX_EXPERIMENTAL_CXX0X__) ) && (__cplusplus < 201103L )
65
66
#error("ERROR: COOL >= 3.0.0 but this compiler does not support c++11")
#endif
Andrea Valassi's avatar
Andrea Valassi committed
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#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