From: Ralf Habacker Date: Mon, 8 Mar 2010 14:55:46 +0000 (+0100) Subject: fixed backtrace printing on unix with cmake build system X-Git-Tag: dbus-1.3.1~105 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e469239284bfa997ccbc4907afcf6a1a9d666676;p=thirdparty%2Fdbus.git fixed backtrace printing on unix with cmake build system --- diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 1333d9d93..e4a9c0012 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -49,6 +49,9 @@ if(NOT WIN32) OPTION(DBUS_ENABLE_ABSTRACT_SOCKETS "enable support for abstract sockets" ON) endif(NOT WIN32) +#AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE) +OPTION(DBUS_DISABLE_ASSERTS "Disable assertion checking" OFF) + # do config checks INCLUDE(ConfigureChecks.cmake) @@ -103,6 +106,13 @@ if(WIN32) endif(MSVC) endif(WIN32) +if (UNIX AND NOT DBUS_DISABLE_ASSERTS) + # required for backtrace + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wl,--export-dynamic") + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wl,--export-dynamic") + add_definitions(-DDBUS_BUILT_R_DYNAMIC) +endif (UNIX AND NOT DBUS_DISABLE_ASSERTS) + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") ######################################################################### @@ -245,9 +255,6 @@ endif(DBUS_ENABLE_ANSI) #AC_ARG_ENABLE(verbose-mode, AS_HELP_STRING([--enable-verbose-mode],[support verbose debug mode]),enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE) OPTION(DBUS_ENABLE_VERBOSE_MODE "support verbose debug mode" ON) -#AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE) -OPTION(DBUS_DISABLE_ASSERTS "Disable assertion checking" OFF) - #AC_ARG_ENABLE(checks, AS_HELP_STRING([--enable-checks],[include sanity checks on public API]),enable_checks=$enableval,enable_checks=yes) OPTION(DBUS_DISABLE_CHECKS "Disable public API sanity checking" OFF)