From 9da03e4d16782fc6adffe3a50299d0fda5bc4c13 Mon Sep 17 00:00:00 2001 From: Andrea Valassi <avalassi@cern.ch> Date: Wed, 23 Sep 2015 13:43:27 +0000 Subject: [PATCH] Enable COOL_HAS_CPP11 by default (CORALCOOL-2808) git-svn-id: https://svnweb.cern.ch/trac/lcgcool/changeset/19722 4525493e-7705-40b1-a816-d608a930855b --- src/CoolKernel/CoolKernel/VersionInfo.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/CoolKernel/CoolKernel/VersionInfo.h b/src/CoolKernel/CoolKernel/VersionInfo.h index 0d99af8ea..d76617505 100644 --- a/src/CoolKernel/CoolKernel/VersionInfo.h +++ b/src/CoolKernel/CoolKernel/VersionInfo.h @@ -12,6 +12,12 @@ // These switches are now hardcoded in all branches of the code (bug #92204). #define COOL290 1 // COOL 2.9.x or higher (COOL 2.8.x is no longer supported) +// 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 + // 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! @@ -45,20 +51,19 @@ //--------------------------------------------------------------------------- #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! +// Sanity check: does this compiler support c++11? (see CORALCOOL-2808) +#ifdef COOL300CPP11 #if ( ! defined(__GXX_EXPERIMENTAL_CXX0X__) ) && (__cplusplus < 201103L ) -#error("ERROR: COOL >= 2.9.7 but this compiler does not support c++11") +#error("ERROR: COOL >= 3.0.0 but this compiler does not support c++11") +#endif #endif // Declare obsolete API calls as deprecated -- GitLab