Closed Jacobfaib closed 2 months ago
src/CMakeLists.txt has
src/CMakeLists.txt
export( TARGETS ${HDF5_VFD_GDS_EXPORTED_LIBS} FILE ${HDF5_VFD_GDS_EXPORTED_TARGETS}.cmake )
but HDF5_VFD_GDS_EXPORTED_LIBS is always empty which causes
HDF5_VFD_GDS_EXPORTED_LIBS
CMake Error in some/parent/project/CMakeLists.txt: export called with target "SomeParentProject" which requires target "hdf5_vfd_gds" that is not in any export set.
This is because:
set(HDF5_VFD_GDS_EXPORTED_LIBS hdf5_vfd_gds ${HDF5_VFD_GDS_EXPORTED_LIBS} PARENT_SCOPE)
only sets the new value in the parent scope, which does not trickle down to the child scope (thanks CMake for this brain-damaged design...).
Changing this to
set(HDF5_VFD_GDS_EXPORTED_LIBS hdf5_vfd_gds ${HDF5_VFD_GDS_EXPORTED_LIBS}) set(HDF5_VFD_GDS_EXPORTED_LIBS ${HDF5_VFD_GDS_EXPORTED_LIBS} PARENT_SCOPE)
fixes the problem
Thanks @Jacobfaib for the report! Could you go ahead and create a PR with the change?
src/CMakeLists.txt
hasbut
HDF5_VFD_GDS_EXPORTED_LIBS
is always empty which causesThis is because:
only sets the new value in the parent scope, which does not trickle down to the child scope (thanks CMake for this brain-damaged design...).
Changing this to
fixes the problem