Skip to content
Snippets Groups Projects
Commit 71bd4232 authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Bug 1617: We don't need a configure test for __cxa_demangle(). Every GNU C++...

Bug 1617: We don't need a configure test for __cxa_demangle(). Every GNU C++ compiler supports it, so we can simply test for the __GNUG__ preprocessor variable.
parent a9b3939b
No related branches found
No related tags found
No related merge requests found
...@@ -14,12 +14,8 @@ ...@@ -14,12 +14,8 @@
# HAVE_BFD_H - true if header file bfd.h exists # HAVE_BFD_H - true if header file bfd.h exists
# (contains declaration of bfd_* functions) # (contains declaration of bfd_* functions)
# BFD_LIBRARY - full path to libbfd, if found # BFD_LIBRARY - full path to libbfd, if found
# IBERTY_LIBRARY - full path to libiberty, if found # IBERTY_LIBRARY - full path to libiberty, if searched and found
# HAVE_DEMANGLE_H - true if header file demangle.h exists # Z_LIBRARY - full path to libz, if searched and found
# (contains declaration of cplus_demangle())
# HAVE_DECL_BASENAME - true if a declaration for basename() exists
# HAVE_CPLUS_DEMANGLE - true if function demangle() exists
# Z_LIBRARY - full path to libz, if found
# Copyright (C) 2009-2010 # Copyright (C) 2009-2010
# ASTRON (Netherlands Institute for Radio Astronomy) # ASTRON (Netherlands Institute for Radio Astronomy)
...@@ -43,7 +39,6 @@ ...@@ -43,7 +39,6 @@
include(CheckIncludeFile) include(CheckIncludeFile)
include(CheckFunctionExists) include(CheckFunctionExists)
include(CheckCXXSourceCompiles)
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
if(NOT BACKTRACE_FOUND) if(NOT BACKTRACE_FOUND)
...@@ -69,11 +64,6 @@ if(NOT BACKTRACE_FOUND) ...@@ -69,11 +64,6 @@ if(NOT BACKTRACE_FOUND)
list(APPEND BACKTRACE_LIBRARIES ${Z_LIBRARY}) list(APPEND BACKTRACE_LIBRARIES ${Z_LIBRARY})
endif(Z_LIBRARY) endif(Z_LIBRARY)
endif(BFD_LIBRARY MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$") endif(BFD_LIBRARY MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$")
# Check for C++ demangler
check_cxx_source_compiles("
#include <cxxabi.h>
int main() { abi::__cxa_demangle(\"\", 0, 0, 0); }"
HAVE___CXA_DEMANGLE)
endif(BFD_LIBRARY) endif(BFD_LIBRARY)
endif(HAVE_BFD_H) endif(HAVE_BFD_H)
endif(HAVE_BACKTRACE) endif(HAVE_BACKTRACE)
......
option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(BUILD_SHARED_LIBS "Build shared libraries" ON)
#set(CASACORE_ROOT_DIR /opt/lofar/external/casacore) #set(CASACORE_ROOT_DIR /opt/lofar/external/casacore)
set(ENV{JAVA_HOME} /usr/lib64/jvm/java-1.6.0-openjdk-1.6.0)
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#ifdef HAVE___CXA_DEMANGLE #ifdef __GNUG__
# include <cxxabi.h> # include <cxxabi.h>
#endif #endif
...@@ -66,7 +66,7 @@ namespace LOFAR ...@@ -66,7 +66,7 @@ namespace LOFAR
if (found) { if (found) {
if (functionname && *functionname) { if (functionname && *functionname) {
# ifdef HAVE___CXA_DEMANGLE # ifdef __GNUG__
char* realname = abi::__cxa_demangle(functionname, 0, 0, 0); char* realname = abi::__cxa_demangle(functionname, 0, 0, 0);
if (realname) { if (realname) {
trace[i].function = realname; trace[i].function = realname;
......
...@@ -161,8 +161,5 @@ ...@@ -161,8 +161,5 @@
/* Define to 1 if you have the `backtrace' function. */ /* Define to 1 if you have the `backtrace' function. */
#cmakedefine HAVE_BACKTRACE 1 #cmakedefine HAVE_BACKTRACE 1
/* Define to 1 if you have the `abi::__cxa_demangle' function. */
#cmakedefine HAVE___CXA_DEMANGLE 1
/* Define to 1 if you have a declaration for the `getprotobyname_r' function. */ /* Define to 1 if you have a declaration for the `getprotobyname_r' function. */
#cmakedefine HAVE_GETPROTOBYNAME_R 1 #cmakedefine HAVE_GETPROTOBYNAME_R 1
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