-
Notifications
You must be signed in to change notification settings - Fork 647
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
base: master
Are you sure you want to change the base?
Conversation
AndersHogqvist
commented
Sep 16, 2024
•
edited
Loading
edited
- 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
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.
LZ4 dependency fix
HDF5 is only required if building tests. Also fixed so that both C and CPP static libraries are installed.
HDF5 only if building tests
The static libs now have the _s suffix as before.
Removed renaming static libs
message(WARNING "hdf5 library not found, some tests will not be run") | ||
else() | ||
include_directories(${HDF5_INCLUDE_DIR}) | ||
if(BUILD_TESTS) |
There was a problem hiding this comment.
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.
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}")
There was a problem hiding this comment.
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:
if(BUILD_TESTS) | |
+if(BUILD_EXAMPLES OR BUILD_TESTS OR USE_MPI) |