summaryrefslogtreecommitdiffstats
path: root/dcop
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-11-05 15:30:28 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-11-05 15:31:16 +0100
commitc527d5931f5104905d0d6dd8651d0f0a19b910bc (patch)
treebb155ac026198a994c7d4dd85fb7296147e42b91 /dcop
parent8a26a48f42d2dbe055033edfaaac76162445bcb8 (diff)
downloadtdelibs-c527d5931f5104905d0d6dd8651d0f0a19b910bc.tar.gz
tdelibs-c527d5931f5104905d0d6dd8651d0f0a19b910bc.zip
cmake: Avoid double generating of dcop/tests files.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 83d02c95a1edfc69f303d838f904dc142bdb2f41)
Diffstat (limited to 'dcop')
-rw-r--r--dcop/tests/CMakeLists.txt21
1 files changed, 7 insertions, 14 deletions
diff --git a/dcop/tests/CMakeLists.txt b/dcop/tests/CMakeLists.txt
index e3e4c5312..58e645606 100644
--- a/dcop/tests/CMakeLists.txt
+++ b/dcop/tests/CMakeLists.txt
@@ -30,24 +30,12 @@ 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}" )
@@ -55,9 +43,14 @@ add_test( NAME "dcop/dcop-tests"
set_tests_properties( dcop/dcop-tests PROPERTIES TIMEOUT 30)
-##### test.h and files ##########################
+##### generated files ###########################
-add_custom_target( dcop_tests_generated DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/test.h )
+add_custom_target( dcop_tests_generated
+ DEPENDS
+ ${CMAKE_CURRENT_BINARY_DIR}/test.h
+ ${CMAKE_CURRENT_BINARY_DIR}/test_skel.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/test_stub.cpp
+)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test.h ${CMAKE_CURRENT_BINARY_DIR}/shell.generated