summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2019-02-05 14:46:51 +0100
committerRalf Habacker <ralf.habacker@freenet.de>2020-05-16 15:25:01 +0000
commit9738a48a3f22f9d0a2e397e0a122c56d58ee9728 (patch)
tree5963d306d6ba5e156bba8f4f48cfffca2ffdacb2 /CMakeLists.txt
parent74717a9c0cec5879f405b4e439aded80c2b6dc7f (diff)
downloaddbus-9738a48a3f22f9d0a2e397e0a122c56d58ee9728.tar.gz
cmake: Let Wine display the correct file name and line numbers for backtraces
Wine currently only supports the symbol formats STABS and DWARF 2, but not the other versions, with STABS providing the most information and being the first choice. Since we already use the cmake variable DBUS_USE_WINE for running tests under Wine, we also use it to activate the special symbol format. Closes dbus/dbus/#133
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 047cab87..a0095ebb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -227,6 +227,11 @@ generate_warning_cflags(WARNINGS_CFLAGS "${WARNINGS}" "${WARNINGS_DISABLED}" "${
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNINGS_CFLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS_CFLAGS}")
+# let wine be able to show file and lines in backtrace
+if(DBUS_USE_WINE)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gstabs")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gstabs")
+endif()
if(UNIX AND NOT DBUS_DISABLE_ASSERT)
# required for backtrace