From c0bfd559386c1ef5997c23b9cb47a26867c4fc21 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 16 Oct 2018 12:43:16 +0200 Subject: [PATCH] Move DBUS_ENABLE_EMBEDDED_TESTS and BUS_ENABLE_MODULAR_TESTS to config.h.cmake Bug: https://gitlab.freedesktop.org/dbus/dbus/issues/117 Reviewed-by: Simon McVittie --- cmake/CMakeLists.txt | 1 - cmake/config.h.cmake | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index d6a7c8a25..10e9d67ab 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -305,7 +305,6 @@ option (DBUS_BUILD_TESTS "enable unit test code" ON) if(DBUS_BUILD_TESTS) set (DBUS_ENABLE_EMBEDDED_TESTS ON) set (DBUS_ENABLE_MODULAR_TESTS ON) - add_definitions(-DDBUS_ENABLE_EMBEDDED_TESTS -DDBUS_ENABLE_MODULAR_TESTS) endif(DBUS_BUILD_TESTS) option (DBUS_USE_OUTPUT_DEBUG_STRING "enable win32 debug port for message output" OFF) diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index f12e29829..1be7731b4 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -46,6 +46,9 @@ #ifndef DBUS_DISABLE_CHECKS # define DBUS_ENABLE_CHECKS 1 #endif +#cmakedefine DBUS_ENABLE_EMBEDDED_TESTS 1 +#cmakedefine DBUS_ENABLE_MODULAR_TESTS 1 + /* xmldocs */ /* doxygen */ #cmakedefine DBUS_GCOV_ENABLED 1 -- 2.47.3