mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 20:24:48 -06:00
add a cmake check for the abi::__cxa_demangle() function
this was also forgotten. sorry...
This commit is contained in:
parent
9f5ab8e257
commit
cd6f18ed90
17
cmake/Modules/FindCxaDemangle.cmake
Normal file
17
cmake/Modules/FindCxaDemangle.cmake
Normal file
@ -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 <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)
|
Loading…
Reference in New Issue
Block a user