H5detect vs H5Tinit.c dependency problem
System: macOS 10.15, cmake 3.13.2, GNU make 3.81, VTK master from Sept 15, 2021
Doing a "Makefile" build (-j 1) of VTK generated this error:
No rule to make target 'ThirdParty/hdf5/vtkhdf5/src/H5Tinit.c'
The build continued after I forced H5detect to build:
make H5detect
make
I haven't dug very deep into this, but the following code block (line 1084 in ThirdParty/hdf5/vtkhdf5/src/CMakeLists.txt) seems to be implicated:
add_custom_command (TARGET H5detect POST_BUILD
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:H5detect>
ARGS H5Tinit.c
BYPRODUCTS H5Tinit.c gen_SRCS.stamp1
COMMAND ${CMAKE_COMMAND}
ARGS -E touch gen_SRCS.stamp1
DEPENDS H5detect
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
COMMENT "Create H5Tinit.c"
)
Perhaps the problem is the use of "BYPRODUCTS" with no "OUTPUT" with the Makefile generator?
There seem to be similar dependency issues with H5lib_settings.c
and H5make_libsettings
. In that case, the workaround was this:
make H5make_libsettings