From: Ralf Habacker Date: Fri, 1 Jul 2011 22:50:39 +0000 (+0200) Subject: Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools. X-Git-Tag: dbus-1.4.14~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=110e06a78c300384cce076996692e504594a43a0;p=thirdparty%2Fdbus.git Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools. --- diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 7476975b8..04f318a30 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -98,6 +98,8 @@ 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) +option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF) + # do config checks INCLUDE(ConfigureChecks.cmake) @@ -557,6 +559,7 @@ message(" Building unit tests: ${DBUS_BUILD_TESTS} " message(" Building verbose mode: ${DBUS_ENABLE_VERBOSE_MODE} ") message(" Building w/o assertions: ${DBUS_DISABLE_ASSERTS} ") message(" Building w/o checks: ${DBUS_DISABLE_CHECKS} ") +message(" Building bus stats API: ${DBUS_ENABLE_STATS} ") message(" installing system libs: ${DBUS_INSTALL_SYSTEM_LIBS} ") #message(" Building SELinux support: ${have_selinux} ") #message(" Building dnotify support: ${have_dnotify} ") diff --git a/cmake/bus/CMakeLists.txt b/cmake/bus/CMakeLists.txt index 876be8105..1db519f8b 100644 --- a/cmake/bus/CMakeLists.txt +++ b/cmake/bus/CMakeLists.txt @@ -74,6 +74,12 @@ set (BUS_SOURCES ${XML_SOURCES} ${DIR_WATCH_SOURCE} ) +if(DBUS_ENABLE_STATS) + list(APPEND BUS_SOURCES + ${BUS_DIR}/stats.c + ${BUS_DIR}/stats.h + ) +endif() include_directories(${XML_INCLUDE_DIR}) diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index df3d45a4a..6bc6aa564 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -25,6 +25,7 @@ #cmakedefine DBUS_MICRO_VERSION @DBUS_MICRO_VERSION@ #cmakedefine DBUS_VERSION ((@DBUS_MAJOR_VERSION@ << 16) | (@DBUS_MINOR_VERSION@ << 8) | (@DBUS_MICRO_VERSION@)) #cmakedefine DBUS_VERSION_STRING "@DBUS_VERSION_STRING@" +#cmakedefine DBUS_ENABLE_STATS #define VERSION DBUS_VERSION_STRING