summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/CMakeLists.txt4
-rw-r--r--cmake/bus/CMakeLists.txt4
-rw-r--r--cmake/config.h.cmake1
-rw-r--r--cmake/dbus/CMakeLists.txt8
-rw-r--r--cmake/test/name-test/CMakeLists.txt4
5 files changed, 11 insertions, 10 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 45d90c99..f25e55d9 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -231,7 +231,9 @@ ENABLE_TESTING()
option (DBUS_BUILD_TESTS "enable unit test code" ON)
if(DBUS_BUILD_TESTS)
- add_definitions(-DDBUS_BUILD_TESTS -DDBUS_ENABLE_EMBEDDED_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/bus/CMakeLists.txt b/cmake/bus/CMakeLists.txt
index 6fa19f27..9943584a 100644
--- a/cmake/bus/CMakeLists.txt
+++ b/cmake/bus/CMakeLists.txt
@@ -107,12 +107,12 @@ if (DBUS_SERVICE)
install_targets(/bin dbus-service )
endif (DBUS_SERVICE)
-if (DBUS_BUILD_TESTS)
+if (DBUS_ENABLE_EMBEDDED_TESTS)
add_executable(bus-test ${BUS_SOURCES} ${BUS_DIR}/test-main.c)
target_link_libraries(bus-test ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY})
set_target_properties(bus-test PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
add_test(bus-test ${EXECUTABLE_OUTPUT_PATH}/bus-test ${CMAKE_BINARY_DIR}/test/data)
-endif (DBUS_BUILD_TESTS)
+endif (DBUS_ENABLE_EMBEDDED_TESTS)
if(MSVC)
project_source_group(${GROUP_CODE} bus_test_SOURCES dummy)
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
index 969a625c..a961d1ab 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -39,7 +39,6 @@
#define TEST_BUS_BINARY "@TEST_BUS_BINARY@"
/* Some dbus features */
-#cmakedefine DBUS_BUILD_TESTS 1
#cmakedefine DBUS_ENABLE_ANSI 1
#cmakedefine DBUS_ENABLE_VERBOSE_MODE 1
#cmakedefine DBUS_DISABLE_ASSERT 1
diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt
index 1d04d46e..0205f852 100644
--- a/cmake/dbus/CMakeLists.txt
+++ b/cmake/dbus/CMakeLists.txt
@@ -166,12 +166,12 @@ set (DBUS_UTIL_SOURCES
${DBUS_DIR}/dbus-sysdeps-util.c
)
-if (DBUS_BUILD_TESTS)
+if (DBUS_ENABLE_EMBEDDED_TESTS)
set (DBUS_UTIL_SOURCES
${DBUS_UTIL_SOURCES}
${DBUS_DIR}/dbus-test.c
)
-endif (DBUS_BUILD_TESTS)
+endif (DBUS_ENABLE_EMBEDDED_TESTS)
set (DBUS_UTIL_HEADERS
${DBUS_DIR}/dbus-asv-util.h
@@ -298,13 +298,13 @@ else(WIN32)
target_link_libraries(dbus-internal ${CMAKE_THREAD_LIBS_INIT} rt)
endif(WIN32)
-if (DBUS_BUILD_TESTS)
+if (DBUS_ENABLE_EMBEDDED_TESTS)
set (TESTS_ENVIRONMENT "DBUS_TEST_DATA=${CMAKE_SOURCE_DIR}/test/data DBUS_TEST_HOMEDIR=${CMAKE_BUILD_DIR}/dbus")
ADD_EXECUTABLE(dbus-test ${CMAKE_SOURCE_DIR}/../dbus/dbus-test-main.c)
target_link_libraries(dbus-test ${DBUS_INTERNAL_LIBRARIES})
add_test(dbus-test ${EXECUTABLE_OUTPUT_PATH}/dbus-test ${CMAKE_SOURCE_DIR}/../test/data)
set_target_properties(dbus-test PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
-ENDIF (DBUS_BUILD_TESTS)
+ENDIF (DBUS_ENABLE_EMBEDDED_TESTS)
if (UNIX)
# set version info
diff --git a/cmake/test/name-test/CMakeLists.txt b/cmake/test/name-test/CMakeLists.txt
index 80b9908b..44e4f6d1 100644
--- a/cmake/test/name-test/CMakeLists.txt
+++ b/cmake/test/name-test/CMakeLists.txt
@@ -1,4 +1,4 @@
-if (DBUS_BUILD_TESTS)
+if (DBUS_ENABLE_EMBEDDED_TESTS)
set (NAMEtest-DIR ../../../test/name-test)
@@ -36,4 +36,4 @@ add_executable(test-autolaunch ${NAMEtest-DIR}/test-autolaunch.c)
target_link_libraries(test-autolaunch dbus-testutils)
ADD_TEST(test-autolaunch ${EXECUTABLE_OUTPUT_PATH}/test-autolaunch)
-endif (DBUS_BUILD_TESTS)
+endif (DBUS_ENABLE_EMBEDDED_TESTS)