From db60dede7d236a89fb8b6aceba5e1fd2ee44d8bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 3 Mar 2019 15:22:18 +0100 Subject: [PATCH] Fix CMake build dependencies for tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 8fc2a6ca26ff8a6aaffc57357be865a8dcfecbd8) --- dcop/tests/CMakeLists.txt | 12 ++++++++++++ kdecore/tests/CMakeLists.txt | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/dcop/tests/CMakeLists.txt b/dcop/tests/CMakeLists.txt index f321f06c9..e3e4c5312 100644 --- a/dcop/tests/CMakeLists.txt +++ b/dcop/tests/CMakeLists.txt @@ -30,12 +30,24 @@ tde_add_check_executable( dcop_test AUTOMOC DEPENDENCIES dcop_tests_generated ) +set_property( + SOURCE test.cpp + APPEND PROPERTY + OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/test_skel.cpp +) + tde_add_check_executable( driver AUTOMOC SOURCES driver.cpp ${CMAKE_CURRENT_BINARY_DIR}/test.stub LINK kdecore-shared DEPENDENCIES dcop_tests_generated ) +set_property( + SOURCE driver.cpp + APPEND PROPERTY + OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/test_stub.cpp +) + add_test( NAME "dcop/dcop-tests" COMMAND sh -x "${CMAKE_CURRENT_SOURCE_DIR}/run-tests.sh" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) diff --git a/kdecore/tests/CMakeLists.txt b/kdecore/tests/CMakeLists.txt index bc6dcabf7..4e6bf4592 100644 --- a/kdecore/tests/CMakeLists.txt +++ b/kdecore/tests/CMakeLists.txt @@ -52,3 +52,9 @@ tde_add_check_executable( kidlservertest AUTOMOC SOURCES KIDLTest.cpp KIDLTest.s LINK kconfigtest-shared ) tde_add_check_executable( kidlclienttest AUTOMOC SOURCES KIDLTestClient.cpp KIDLTest.stub LINK kconfigtest-shared ) + +set_property( + SOURCE KIDLTestClient.cpp + APPEND PROPERTY + OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/KIDLTest_stub.cpp +)