Skip to content

Bzip2/Bz2 confusion in Cmake build #2717

@zklaus

Description

@zklaus

I think there is some confusion between Bzip2 and Bz2 in the Cmake build.
Namely, there are two Cmake detection modules (here and here), but only the Bz2 one seems to be called, leading to only the Bz2_FOUND variable being set.

In the plugin section, the bzip2 plugin is build unconditionally, either with the vendored copy of libbzip2 or the system one, see

IF(HAVE_LOCAL_BZ2)
SET(h5bzip2_SOURCES H5Zbzip2.c blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c bzlib.c bzlib.h bzlib_private.h)
buildplugin(h5bzip2 "h5bzip2")
ELSE()
SET(h5bzip2_SOURCES H5Zbzip2.c)
buildplugin(h5bzip2 "h5bzip2" ${Bzip2_LIBRARIES})
ENDIF()

However, the install of the plugin is conditioned on the Bzip2_FOUND variable, which is never set, meaning the plugin will never be installed, see

IF(Bzip2_FOUND)
installplugin(h5bzip2)
ENDIF()
.

Unless there is a separate Bz2 library or something else that I am not aware of, the Cmake documentation seems to suggest that one should instead use FIND_PACKAGE(Bzip2) and remove the usage of Bz2?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions