diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2013-07-26 12:11:21 -0400 |
---|---|---|
committer | John Ehresman <jpe@wingware.com> | 2013-07-30 17:13:08 +0200 |
commit | ae2a80453b95775364e93ed1a4647429b2fd7bad (patch) | |
tree | 2e4765328e7de5b02c0e7b6c62c24601317ba7ea /tests/samplebinding | |
parent | 9da47455fa23323c68af13f1cd44ee2380b6c682 (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/samplebinding')
-rw-r--r-- | tests/samplebinding/CMakeLists.txt | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/samplebinding/CMakeLists.txt b/tests/samplebinding/CMakeLists.txt index f0d973088..78bba9da4 100644 --- a/tests/samplebinding/CMakeLists.txt +++ b/tests/samplebinding/CMakeLists.txt @@ -118,7 +118,8 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sample-binding.txt.in" "${CMAKE_CURRENT_BINARY_DIR}/sample-binding.txt" @ONLY) add_custom_command(OUTPUT ${sample_SRC} -COMMAND ${shibokengenerator_BINARY_DIR}/shiboken --project-file=${CMAKE_CURRENT_BINARY_DIR}/sample-binding.txt ${GENERATOR_EXTRA_FLAGS} +COMMAND shiboken --project-file=${CMAKE_CURRENT_BINARY_DIR}/sample-binding.txt ${GENERATOR_EXTRA_FLAGS} +DEPENDS ${sample_TYPESYSTEM} ${CMAKE_CURRENT_SOURCE_DIR}/global.h shiboken WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Running generator for 'sample' test binding..." ) @@ -137,5 +138,3 @@ target_link_libraries(sample libsample ${SBK_PYTHON_LIBRARIES} libshiboken) - -add_dependencies(sample shiboken) |