diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2010-03-08 15:55:46 +0100 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2010-03-08 15:55:46 +0100 |
commit | e469239284bfa997ccbc4907afcf6a1a9d666676 (patch) | |
tree | 5f8f222feee1f674f47909bb4ea68a51e72d4d6a /cmake | |
parent | 47e37899a3daf33ab799f674c2dc8ce869cdd5fa (diff) |
fixed backtrace printing on unix with cmake build system
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 1333d9d9..e4a9c001 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) |