Skip to content
Snippets Groups Projects
Verified Commit aba646d3 authored by René Fritze's avatar René Fritze
Browse files

[cmake] add macro to automatic bindings dependency building

Adding this macro in your source tree with a list of module names
will give you a 'dependent_bindings' target to build and if you don't
set ```-DDXT_NO_AUTO_BINDINGS_DEPENDS=TRUE``` this is added as a
dependency for the local 'bindings' target
parent ffc998a5
No related branches found
No related tags found
2 merge requests!10Fix compilation with new clang,!6Merge pybind
......@@ -179,3 +179,21 @@ function(dune_pybindxi_add_module target_name)
endif()
endif()
endfunction()
macro(dxt_add_make_dependent_bindings)
add_custom_target(dependent_bindings)
if(TARGET bindings AND NOT DXT_NO_AUTO_BINDINGS_DEPENDS)
add_dependencies(bindings dependent_bindings)
endif()
foreach(_mod ${ARGN} )
dune_module_path(MODULE ${_mod}
RESULT ${_mod}_binary_dir
BUILD_DIR)
set(tdir ${${_mod}_binary_dir})
if(IS_DIRECTORY ${tdir})
add_custom_target( ${_mod}_bindings
COMMAND ${CMAKE_COMMAND} --build ${tdir} --target bindings)
add_dependencies(dependent_bindings ${_mod}_bindings)
endif()
endforeach()
endmacro()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment