]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
cmake: move up checking DBUS_ENABLE_EMBEDDED_TESTS from subdir test/name-test to...
authorRalf Habacker <ralf.habacker@freenet.de>
Mon, 27 Apr 2020 18:24:57 +0000 (20:24 +0200)
committerRalf Habacker <ralf.habacker@freenet.de>
Wed, 23 Sep 2020 14:27:53 +0000 (14:27 +0000)
The whole file is only added with the mentioned variable
set, so it can also be skipped completly one level up.

test/CMakeLists.txt
test/name-test/CMakeLists.txt

index f78bba54e0b88350666ec20c5016f174164b5e7f..00042000ecb2d7dc4717a90b1117aa74aa30586d 100644 (file)
@@ -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
index 32f060a2bdb217738e5330c9c646dc4dbc26b69e..7058d6967adea007c9deb3416e5632cf7457284d 100644 (file)
@@ -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()