vtk_module_compile_options does not behave exactly like target_compile_options
vtk_module_compile_options(target PUBLIC PRIVATE)
fails with:
target_compile_options called with incorrect number of arguments
While
target_compile_options(target PUBLIC PRIVATE) works without issue.
The problem is that during the argument processing in vtk_module_compile_options, if none are provided, the resulting call is:
target_compile_options(target)
, which is incorrect.
This is highly impractical with these kind of codes:
vtk_module_compile_options(target PUBLIC ${ACCUMULATED_PUBLIC_OPTIONS} PRIVATE ${ACCUMULATED_PRIVATE_OPTIONS} )