Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LZ4 dependency fix and CMake fix #523

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

AndersHogqvist
Copy link

@AndersHogqvist AndersHogqvist commented Sep 16, 2024

  • serialization.h split into header and source file to remove external LZ4 dependency
  • Fixed the LZ4 linking in CMake files so that the include and library paths for LZ4 are correct
  • Fixed a bug that prevented static cpp library to be installed
  • Removed HDF5 dependency if tests are not built

Anders Högqvist and others added 6 commits September 16, 2024 08:49
Serialization split into header and source file to avoid external
dependency to LZ4 library. Also fixed linkage to LZ4 by changing
variables used in CMakeLists.txt.
HDF5 is only required if building tests. Also fixed
so that both C and CPP static libraries are installed.
The static libs now have the _s suffix as before.
@AndersHogqvist
Copy link
Author

This should make #507, #481 and #400 obsolete

message(WARNING "hdf5 library not found, some tests will not be run")
else()
include_directories(${HDF5_INCLUDE_DIR})
if(BUILD_TESTS)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you only include hdf5 iff you build tests, flann_mpi_server / flann_mpi_client from src/cpp/CMakeLists.txt#L71 and flann_example_cpp / flann_example_mpi from examples/CMakeLists.txt#L13 are never build unless you also build the tests.

Suggested change
if(BUILD_TESTS)
if(USE_HDF5)

Something like this would follow the other options.

You'd also need to add this after L62:

option(USE_HDF5 "Use HDF5" OFF)

And this at the end.

message(STATUS "Using HDF5 support: ${USE_HDF5}")
message(STATUS "Using Parallel HDF5 support: ${HDF5_IS_PARALLEL}")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or you use something like:

Suggested change
if(BUILD_TESTS)
+if(BUILD_EXAMPLES OR BUILD_TESTS OR USE_MPI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants