Skip to content

Commit

Permalink
cisstMacros.cmake: add dependency between .i file and library being w…
Browse files Browse the repository at this point in the history
…rapped to force header generation (cisstDataGenerator) before SWIG runs.
  • Loading branch information
adeguet1 committed Jul 10, 2019
1 parent 1acf760 commit c83c339
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/cisstMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ function (cisst_add_swig_module ...)
# make sure the runtime code is not included
set_source_files_properties (${SWIG_INTERFACE_FILE}
PROPERTIES SWIG_FLAGS "-v;-modern;-fvirtual")
# make sure source file is not used before libraries are build
set_source_files_properties (${SWIG_INTERFACE_FILE} PROPERTIES DEPENDS "${MODULE_LINK_LIBRARIES}")
# finally create the swig project using CMake command
set (MODULE_NAME ${MODULE}Python)
cisst_cmake_debug ("cisst_add_swig_module: swig_add_library (${MODULE_NAME} LANGUAGE python SOURCES ${SWIG_INTERFACE_FILE})")
Expand Down

0 comments on commit c83c339

Please sign in to comment.