Commit ff9237b5 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

Merge branch 'feature/remove-cxa-demangle-checks' into 'master'

Remove cxa demangle cmake check

See merge request !934
parents c36b4c3d fb1d5dd7
Pipeline #34894 passed with stage
in 8 minutes and 13 seconds
......@@ -17,7 +17,6 @@ install(FILES
DuneAddPybind11Module.cmake
DuneCMakeCompat.cmake
DuneCommonMacros.cmake
DuneCxaDemangle.cmake
DuneDoc.cmake
DuneDoxygen.cmake
DuneEnableAllPackages.cmake
......
# This module checks whether the compiler supports the
# abi::__cxa_demangle function required to
# make the type names returned by typeid() human-readable
#
# It sets the variable :code:`HAVE_CXA_DEMANGLE` with the result.
#
include_guard(GLOBAL)
include(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("#include <typeinfo>
#include <cxxabi.h>
int main(void){
int foobar = 0;
const char *foo = typeid(foobar).name();
int status;
char *demangled = abi::__cxa_demangle( foo, 0, 0, &status );
}" HAVE_CXA_DEMANGLE)
......@@ -684,7 +684,6 @@ macro(dune_project)
# check for C++ features, set compiler flags for C++14 or C++11 mode
include(CheckCXXFeatures)
include(DuneCxaDemangle)
# set include path and link path for the current project.
include_directories("${CMAKE_BINARY_DIR}")
......
......@@ -41,9 +41,6 @@
/* Define if you have a BLAS library. */
#cmakedefine HAVE_BLAS 1
/* does the compiler support abi::__cxa_demangle */
#cmakedefine HAVE_CXA_DEMANGLE 1
/* Define if you have LAPACK library. */
#cmakedefine HAVE_LAPACK 1
......
......@@ -14,7 +14,8 @@
#include <typeinfo>
#include <type_traits>
#if HAVE_CXA_DEMANGLE
#if __has_include(<cxxabi.h>) && !DISABLE_CXA_DEMANGLE
#define HAVE_CXA_DEMANGLE 1
#include <cxxabi.h>
#endif // #if HAVE_CXA_DEMANGLE
......
......@@ -71,13 +71,12 @@ dune_add_test(NAME check_fvector_size_fail2
dune_add_test(NAME classnametest-demangled
SOURCES classnametest.cc
LINK_LIBRARIES dunecommon
CMAKE_GUARD HAVE_CXA_DEMANGLE
LABELS quick)
dune_add_test(NAME classnametest-fallback
SOURCES classnametest.cc
LINK_LIBRARIES dunecommon
COMPILE_DEFINITIONS BASICCHECK
COMPILE_DEFINITIONS DISABLE_CXA_DEMANGLE
LABELS quick)
dune_add_test(SOURCES concept.cc
......
......@@ -131,7 +131,7 @@ int main()
checkname(t, Dune::className(Base{}), {}, R"(\bBase\b)");
std::cout << std::endl;
#if BASICCHECK
#if !HAVE_CXA_DEMANGLE
// in this case we only make sure that no segfault or similar happens
return 0;
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment