Fix CMake build dependencies for tests.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 8fc2a6ca26)
v3.5.13-sru
Slávek Banko 6 years ago
parent cfa79f06e2
commit db60dede7d
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -30,12 +30,24 @@ tde_add_check_executable( dcop_test AUTOMOC
DEPENDENCIES dcop_tests_generated 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 tde_add_check_executable( driver AUTOMOC
SOURCES driver.cpp ${CMAKE_CURRENT_BINARY_DIR}/test.stub SOURCES driver.cpp ${CMAKE_CURRENT_BINARY_DIR}/test.stub
LINK kdecore-shared LINK kdecore-shared
DEPENDENCIES dcop_tests_generated 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" add_test( NAME "dcop/dcop-tests"
COMMAND sh -x "${CMAKE_CURRENT_SOURCE_DIR}/run-tests.sh" COMMAND sh -x "${CMAKE_CURRENT_SOURCE_DIR}/run-tests.sh"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )

@ -52,3 +52,9 @@ tde_add_check_executable( kidlservertest AUTOMOC SOURCES KIDLTest.cpp KIDLTest.s
LINK kconfigtest-shared ) LINK kconfigtest-shared )
tde_add_check_executable( kidlclienttest AUTOMOC SOURCES KIDLTestClient.cpp tde_add_check_executable( kidlclienttest AUTOMOC SOURCES KIDLTestClient.cpp
KIDLTest.stub LINK kconfigtest-shared ) KIDLTest.stub LINK kconfigtest-shared )
set_property(
SOURCE KIDLTestClient.cpp
APPEND PROPERTY
OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/KIDLTest_stub.cpp
)

Loading…
Cancel
Save