Skip to content

Headers shouldn't expose HDF5 #4

@DavidMButler

Description

@DavidMButler

Currently the SheafSystem uses HDF5 for file i/o. The HDF5 libraries are statically linked into the shared library (libsheaves.so or dll), so clients of this library do not need to link with the HDF5 libraries. The static library libsheaves.a is just an archive and not linked with anything, so clients of the static library do need to link with the HDF5 libraries.

Even worse, certain SheafSystem header files include hdf5.h, which in turn includes other HDF5 header files. So clients of both of the SheafSystem libraries do have to have access to the appropriate HDF5 header files. To support this requirement, the HDF5 header files are put into the SheafSystem installation include directory along with the SheafSystem's own header files and the HDF5 include directory is added to the BUILD_INTERFACE for the target_include_directories for the shared library. This is inelegant at best and can potentially cause conflicts, for instance if the client is directly using a different version of HDF5.

It is completely unnecessary and should be removed. The SheafSystem should completely encapsulate its use of HDF5. Specifically, libsheaves.a should be statically prelinked with the HDF5 libraries, the SheafSystem header files should not include any HDF5 header files, and the HDF5 files should not be placed in the SheafSystem include directories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions