From cd6f18ed90a0417cef59ca8284e34ff9bb2f5bcd Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Sun, 11 Aug 2013 17:05:21 +0200 Subject: [PATCH] add a cmake check for the abi::__cxa_demangle() function this was also forgotten. sorry... --- cmake/Modules/FindCxaDemangle.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cmake/Modules/FindCxaDemangle.cmake diff --git a/cmake/Modules/FindCxaDemangle.cmake b/cmake/Modules/FindCxaDemangle.cmake new file mode 100644 index 000000000..9f480fa9a --- /dev/null +++ b/cmake/Modules/FindCxaDemangle.cmake @@ -0,0 +1,17 @@ +# Module that checks whether the compiler supports the +# abi::__cxa_demangle function required to +# make the type names returned by typeid() human-readable +# +# Sets the following variable: +# HAVE_CXA_DEMANGLE +# +# perform tests +include(CheckCXXSourceCompiles) + +CHECK_CXX_SOURCE_COMPILES("#include +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)