Skip to content
Snippets Groups Projects
Commit 77203e8a authored by Rosen Matev's avatar Rosen Matev :sunny:
Browse files

Make zstd a private dependency of LHCb

Currently Findzstd.cmake is not installed and thus not available in
downstream projects. When building e.g. Lbcom, zstd seems to be found
from the (LbEnv) conda environment, which is wrong.

zstd is in practice a private dependency of LHCb because its only user
MDFLib is not dependend upon outside of LHCb.

In general, CMake looks for packages wherever CMake is installed (i.e.
the conda environment) and so it's probably good to ignore that with
something like this

```
get_filename_component(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
list(APPEND CMAKE_SYSTEM_IGNORE_PREFIX_PATH "${_CMAKE_INSTALL_DIR}")
```

Not sure where this belongs exactly.

Follows up on !4444
parent 9a3f11f1
Branches rm-zstd-cmake
No related tags found
1 merge request!4506Make zstd a private dependency of LHCb
Pipeline #7170404 passed with stages
in 30 seconds
......@@ -119,7 +119,6 @@ find_package(Vc 1.4.1 REQUIRED)
find_package(VDT REQUIRED)
find_package(XercesC REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(zstd REQUIRED)
find_package(PkgConfig)
pkg_check_modules(git2 libgit2 REQUIRED IMPORTED_TARGET) # for GitEntityResolver
......@@ -134,6 +133,11 @@ find_data_package(TCK/HltTCK REQUIRED)
# -- Private dependencies
if(WITH_LHCb_PRIVATE_DEPENDENCIES)
# zstd is only used in MDFLib. Its headers are in practice not used anywhere downstream of LHCb,
# so zstd is not needed as a dependency in other projects.
# TODO: get rid of MDFLib and merge it into MDF (the plugin library).
find_package(zstd REQUIRED)
if(BUILD_TESTING)
find_package(Boost 1.62 REQUIRED unit_test_framework)
find_package(ROOT 6.20 REQUIRED Tree)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment