aboutsummaryrefslogtreecommitdiffstats
path: root/tests/minimalbinding
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2013-07-26 12:11:21 -0400
committerJohn Ehresman <jpe@wingware.com>2013-07-30 17:13:08 +0200
commitae2a80453b95775364e93ed1a4647429b2fd7bad (patch)
tree2e4765328e7de5b02c0e7b6c62c24601317ba7ea /tests/minimalbinding
parent9da47455fa23323c68af13f1cd44ee2380b6c682 (diff)
Improve dependencies for tests
Add the global header and typesystem XML, and shiboken itself, as dependencies to running Shiboken for generating the wrapped code used in the unit tests. This gives a better example in case of users looking at this code for how to do things in their own projects, and also makes test writing easier by removing the need to do a clean build or touch files to force the wrapping code to be recreated when modifying the test code or the generator. Change command invocation to use shiboken as a target name (CMake will recognize it as a target and use the correct path automatically), and remove the now redundant dependency of the wrapping libraries on the same. (This is superfluous both because using shiboken as a target will cause CMake to add an implicit dependency on it for users of the generated files, but also because it isn't really needed; the generate command having it as a dependency covers needing it built first, and is what we really care about as far as rebuilding anything if it changes.) Change-Id: If5cdf2e98602e500b49ba7b000e4e30e77e1a136 Reviewed-by: John Ehresman <jpe@wingware.com>
Diffstat (limited to 'tests/minimalbinding')
-rw-r--r--tests/minimalbinding/CMakeLists.txt7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/minimalbinding/CMakeLists.txt b/tests/minimalbinding/CMakeLists.txt
index 15eaafc77..a293eb97a 100644
--- a/tests/minimalbinding/CMakeLists.txt
+++ b/tests/minimalbinding/CMakeLists.txt
@@ -16,10 +16,10 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/minimal-binding.txt.in"
"${CMAKE_CURRENT_BINARY_DIR}/minimal-binding.txt" @ONLY)
add_custom_command(OUTPUT ${minimal_SRC}
-COMMAND ${shibokengenerator_BINARY_DIR}/shiboken --project-file=${CMAKE_CURRENT_BINARY_DIR}/minimal-binding.txt ${GENERATOR_EXTRA_FLAGS}
+COMMAND shiboken --project-file=${CMAKE_CURRENT_BINARY_DIR}/minimal-binding.txt ${GENERATOR_EXTRA_FLAGS}
+DEPENDS ${minimal_TYPESYSTEM} ${CMAKE_CURRENT_SOURCE_DIR}/global.h shiboken
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for 'minimal' test binding..."
-DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_minimal.xml libminimal
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
@@ -36,6 +36,3 @@ target_link_libraries(minimal
libminimal
${SBK_PYTHON_LIBRARIES}
libshiboken)
-
-add_dependencies(minimal shiboken)
-