[cmake] protect against hang condition during docstrings generation
@@ -38,6 +38,11 @@ macro(doxy2swig_docstrings COMP)
endforeach()
endforeach()
+ # If this variable is empty, cat will hang, so error out instead.
+ if (NOT DOCSTRINGS_FILES)
+ message(FATAL_ERROR "DOCSTRINGS_FILES=${DOCSTRINGS_FILES}")
+ endif()
+
add_custom_command(OUTPUT ${SICONOS_SWIG_ROOT_DIR}/${COMP}-docstrings.i
DEPENDS ${DOCSTRINGS_FILES}
COMMAND cat
