From 3fa75953b31a371bd1c8150bbde2ff3ce979d198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20M=C3=BCthing?= <muething@dune-project.org> Date: Mon, 14 Apr 2014 22:36:54 +0200 Subject: [PATCH] [Buildsystem] Provide C++11 feature support macros for backwards compatibility --- config.h.cmake | 7 +++++++ m4/cxx11_compiler.m4 | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/config.h.cmake b/config.h.cmake index c75535141..05436bd3c 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -26,6 +26,13 @@ /* does the compiler support __attribute__((unused))? */ #cmakedefine HAS_ATTRIBUTE_UNUSED 1 +/* old feature support macros which were tested until 2.3, keep around for one more release */ +/* As these are now always supported due to the new compiler requirements, they are directly */ +/* defined without an explicit test. */ +#define HAVE_VARIADIC_TEMPLATES 1 +#define HAVE_VARIADIC_CONSTRUCTOR_SFINAE 1 +#define HAVE_RVALUE_REFERENCES 1 + /* Define if you have a BLAS library. */ #cmakedefine HAVE_BLAS 1 diff --git a/m4/cxx11_compiler.m4 b/m4/cxx11_compiler.m4 index 91b6151f8..0f7392388 100644 --- a/m4/cxx11_compiler.m4 +++ b/m4/cxx11_compiler.m4 @@ -63,4 +63,10 @@ AC_DEFUN([CXX11],[ AC_MSG_WARN([Skipping test for C++11 support, make sure your compiler supports at least the feature set of GCC 4.4!]) fi fi + + # set feature support macros for backwards compatibility + AC_DEFINE(HAVE_VARIADIC_TEMPLATES, 1, [THIS MACRO IS DEPRECATED AND ONLY KEPT FOR BACKWARDS COMPATIBILITY UNTIL THE NEXT RELEASE!]) + AC_DEFINE(HAVE_VARIADIC_CONSTRUCTOR_SFINAE, 1, [THIS MACRO IS DEPRECATED AND ONLY KEPT FOR BACKWARDS COMPATIBILITY UNTIL THE NEXT RELEASE!]) + AC_DEFINE(HAVE_RVALUE_REFERENCES, 1, [THIS MACRO IS DEPRECATED AND ONLY KEPT FOR BACKWARDS COMPATIBILITY UNTIL THE NEXT RELEASE!]) + ]) -- GitLab