The CMake documentation says about add_custom_command that the output must
not be used as dependency in more than one target, but this was the case
here: Both the doc_i target and the SWIG target depended on ftdi1_doc.i.
Make the SWIG target depend on doc_i instead.
This fixes that ftdi1_doc.i was built twice with parallel builds, leading
to random errors.
Signed-off-by: Fabian Vogt <fvogt@suse.de>
if ( DOCUMENTATION )
set(CMAKE_SWIG_FLAGS -DDOXYGEN=${DOXYGEN_FOUND})
# manually add dependency for new cmake / swig versions
- set_property(SOURCE ftdi1.i PROPERTY DEPENDS ftdi1_doc.i)
+ set_property(SOURCE ftdi1.i PROPERTY DEPENDS doc_i)
endif()
if(NOT CMAKE_VERSION VERSION_LESS 3.8.0)
swig_add_library ( ftdi1 LANGUAGE python SOURCES ftdi1.i )