Skip to content
Snippets Groups Projects
Commit 70f52c0d authored by Steffen Müthing's avatar Steffen Müthing
Browse files

[Release][Bugfix] Fix __cxa_demangle() on recent clang

The test for __cxa_demangle(), which is used by Dune::className() to
demangle type names, doesn't work on my clang 3.6. Apparently, clang
requires the user to include <typeinfo> before <cxxabi.h>. While
classname.hh already does this, the build system tests don't, causing the
feature to get disabled on clang.

Fixed by adding the include to the build system tests.
parent fb1ce0b4
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,8 @@
# perform tests
include(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("#include <cxxabi.h>
CHECK_CXX_SOURCE_COMPILES("#include <typeinfo>
#include <cxxabi.h>
int main(void){
int foobar = 0;
const char *foo = typeid(foobar).name();
......
......@@ -4,6 +4,7 @@ AC_DEFUN([DUNE_CHECK_CXA_DEMANGLE],[
AC_CACHE_CHECK([for abi::__cxa_demangle], dune_cv_cxa_demangle, [
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <typeinfo>
#include <cxxabi.h>
]],
[[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment