From: Ralf Habacker Date: Mon, 27 Apr 2020 18:24:57 +0000 (+0200) Subject: cmake: move up checking DBUS_ENABLE_EMBEDDED_TESTS from subdir test/name-test to... X-Git-Tag: dbus-1.13.20~56^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b698fb7639b5aeef86c5c5a870ce04f80e5e2042;p=thirdparty%2Fdbus.git cmake: move up checking DBUS_ENABLE_EMBEDDED_TESTS from subdir test/name-test to test The whole file is only added with the mentioned variable set, so it can also be skipped completly one level up. --- diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f78bba54e..00042000e 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -13,7 +13,9 @@ add_library(dbus-testutils STATIC ) target_link_libraries(dbus-testutils ${DBUS_INTERNAL_LIBRARIES}) -add_subdirectory( name-test ) +if(DBUS_ENABLE_EMBEDDED_TESTS) + add_subdirectory( name-test ) +endif() set(manual-dir-iter_SOURCES manual-dir-iter.c diff --git a/test/name-test/CMakeLists.txt b/test/name-test/CMakeLists.txt index 32f060a2b..7058d6967 100644 --- a/test/name-test/CMakeLists.txt +++ b/test/name-test/CMakeLists.txt @@ -1,5 +1,3 @@ -if(DBUS_ENABLE_EMBEDDED_TESTS) - add_definitions(${DBUS_INTERNAL_CLIENT_DEFINITIONS}) add_helper_executable(test-autolaunch test-autolaunch.c dbus-testutils) @@ -14,4 +12,3 @@ add_session_test_executable(test-shutdown test-shutdown.c dbus-testutils) if (ENABLE_TRADITIONAL_ACTIVATION) add_session_test_executable(test-thread-init test-threads-init.c ${DBUS_INTERNAL_LIBRARIES}) endif() -endif()