summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorLieven Hey <lieven.hey@kdab.com>2021-09-15 14:57:23 +0200
committerMilian Wolff <milian.wolff@kdab.com>2022-06-08 20:17:56 +0000
commite50bc913563e445888f08de03007ff91bcd5dd1e (patch)
treebef0a5d27399ca21c7e10ff172671948de7b44c0 /cmake
parentf2e019928c5f6449724319f08bd5f0d8a1532ad1 (diff)
add support for d symbol demangling
I added a system that simplifies adding new demanglers and provides a fast path when demangling symbols Change-Id: Ie5ca43632b53e41c0a4214772193af09ca4593cc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindLibDDemangle.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/FindLibDDemangle.cmake b/cmake/FindLibDDemangle.cmake
new file mode 100644
index 0000000..04f0ecc
--- /dev/null
+++ b/cmake/FindLibDDemangle.cmake
@@ -0,0 +1,22 @@
+if (LIBD_DEMANGLE_LIBRARIES)
+ set (LibDDemangle_FIND_QUIETLY TRUE)
+endif()
+
+find_library(LIBD_DEMANGLE_LIBRARIES
+ NAMES
+ d_demangle
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ ENV LIBRARY_PATH
+ ENV LD_LIBRARY_PATH)
+
+include (FindPackageHandleStandardArgs)
+
+# handle the QUIETLY and REQUIRED arguments and set LIBRUSTC_DEMANGLE_FOUND to TRUE if all listed variables are TRUE
+find_package_handle_standard_args(LibDDemangle DEFAULT_MSG
+ LIBD_DEMANGLE_LIBRARIES)
+
+mark_as_advanced(LIBD_DEMANGLE_LIBRARIES)