summaryrefslogtreecommitdiffstats
path: root/dcop/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-04-09 20:19:10 +0200
committerSlávek Banko <slavek.banko@axis.cz>2017-04-09 20:19:22 +0200
commit9a2c96ae04917d9a5bfe182d5ac41f690d9c17d4 (patch)
tree07b41501c2adc82c8780ffbb2b2678e006c52f4a /dcop/tests/CMakeLists.txt
parentf23de663bb04fd7af4e9d83e65c95d373f9e0794 (diff)
downloadtdelibs-9a2c96ae04917d9a5bfe182d5ac41f690d9c17d4.tar.gz
tdelibs-9a2c96ae04917d9a5bfe182d5ac41f690d9c17d4.zip
Fix CMake build dependencies
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 1cc26703c32c70e888ef94bc408dcb5da6b5f5a4)
Diffstat (limited to 'dcop/tests/CMakeLists.txt')
-rw-r--r--dcop/tests/CMakeLists.txt22
1 files changed, 7 insertions, 15 deletions
diff --git a/dcop/tests/CMakeLists.txt b/dcop/tests/CMakeLists.txt
index b9152cc82..72f8243c6 100644
--- a/dcop/tests/CMakeLists.txt
+++ b/dcop/tests/CMakeLists.txt
@@ -25,13 +25,15 @@ link_directories(
##### checks ####################################
tde_add_check_executable( dcop_test AUTOMOC
- SOURCES test.cpp ${CMAKE_CURRENT_BINARY_DIR}/test.skel ${CMAKE_CURRENT_BINARY_DIR}/test.h
+ SOURCES test.cpp ${CMAKE_CURRENT_BINARY_DIR}/test.skel
LINK tdecore-shared
+ DEPENDENCIES dcop_tests_generated
)
tde_add_check_executable( driver AUTOMOC
- SOURCES driver.cpp ${CMAKE_CURRENT_BINARY_DIR}/test.stub ${CMAKE_CURRENT_BINARY_DIR}/test.h
+ SOURCES driver.cpp ${CMAKE_CURRENT_BINARY_DIR}/test.stub
LINK tdecore-shared
+ DEPENDENCIES dcop_tests_generated
)
add_test( NAME "dcop/dcop-tests"
@@ -40,8 +42,11 @@ add_test( NAME "dcop/dcop-tests"
set_tests_properties( dcop/dcop-tests PROPERTIES TIMEOUT 30)
+
##### test.h and files ##########################
+add_custom_target( dcop_tests_generated DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/test.h )
+
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test.h ${CMAKE_CURRENT_BINARY_DIR}/shell.generated
COMMAND perl "${CMAKE_CURRENT_SOURCE_DIR}/generate.pl"
@@ -49,16 +54,3 @@ add_custom_command(
DEPENDS testcases generate.pl
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
-
-# a hack because *.skel and *.stub files have to be located the same place with the *.h
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test.skel
- COMMAND ${CMAKE_COMMAND} -E copy_file
- ${CMAKE_CURRENT_SOURCE_DIR}/test.skel ${CMAKE_CURRENT_BINARY_DIR}/
-)
-
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test.stub
- COMMAND ${CMAKE_COMMAND} -E copy_file
- ${CMAKE_CURRENT_SOURCE_DIR}/test.stub ${CMAKE_CURRENT_BINARY_DIR}/
-)