mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
19 lines
373 B
CMake
19 lines
373 B
CMake
|
include(CheckCXXSourceCompiles)
|
||
|
set(CMAKE_REQUIRED_FLAGS "")
|
||
|
|
||
|
check_cxx_source_compiles("
|
||
|
#include <cxxabi.h>
|
||
|
int main() {
|
||
|
int status = -1;
|
||
|
char *demangled = abi::__cxa_demangle(\"test\", 0, 0, &status);
|
||
|
return 0;
|
||
|
}"
|
||
|
DEMANGLE_FOUND
|
||
|
)
|
||
|
|
||
|
if (DEMANGLE_FOUND)
|
||
|
add_compile_options(
|
||
|
-DWITH_DEMANGLE
|
||
|
)
|
||
|
endif (DEMANGLE_FOUND)
|