From 7831ecdb182b62d84d0c3c31868a29263d13752e Mon Sep 17 00:00:00 2001 From: Spp Date: Tue, 2 Oct 2012 15:06:19 +0200 Subject: Core: "Initial support for C++11 compilers" --- src/server/shared/CompilerDefs.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/server/shared/CompilerDefs.h') diff --git a/src/server/shared/CompilerDefs.h b/src/server/shared/CompilerDefs.h index f7e3d0b4979..b8be66d928f 100755 --- a/src/server/shared/CompilerDefs.h +++ b/src/server/shared/CompilerDefs.h @@ -50,12 +50,20 @@ # define COMPILER COMPILER_INTEL #elif defined( __GNUC__ ) # define COMPILER COMPILER_GNU +# define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #else -# pragma error "FATAL ERROR: Unknown compiler." +# error "FATAL ERROR: Unknown compiler." #endif #if COMPILER == COMPILER_MICROSOFT # pragma warning( disable : 4267 ) // conversion from 'size_t' to 'int', possible loss of data # pragma warning( disable : 4786 ) // identifier was truncated to '255' characters in the debug information #endif + +#if defined(__cplusplus) && __cplusplus == 201103L +# define COMPILER_HAS_CPP11_SUPPORT 1 +#else +# define COMPILER_HAS_CPP11_SUPPORT 0 +#endif + #endif -- cgit v1.2.3