Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6a68ee4
refine taskfile
Bill-hbrhbr Oct 23, 2025
701620d
fix indent
Bill-hbrhbr Oct 23, 2025
060a0ba
Add guidelines for writing taskfiles
Bill-hbrhbr Oct 23, 2025
efde834
Improve README
Bill-hbrhbr Oct 23, 2025
90bbe66
Merge branch 'main' into improve-deps-main-taskfile
Bill-hbrhbr Oct 23, 2025
2d0280c
Merge branch 'main' into improve-deps-main-taskfile
Bill-hbrhbr Oct 23, 2025
411a2f5
Merge branch 'main' into improve-deps-main-taskfile
Bill-hbrhbr Oct 27, 2025
feceebc
Address review
Bill-hbrhbr Oct 27, 2025
6c64a5b
Address coderabbitai comments
Bill-hbrhbr Oct 27, 2025
ed63112
Merge branch 'main' into improve-deps-main-taskfile
davidlion Oct 31, 2025
ad9e783
Merge branch 'main' into improve-deps-main-taskfile
Bill-hbrhbr Nov 5, 2025
b61382f
Update taskfiles/deps/README.md
Bill-hbrhbr Nov 7, 2025
a59858d
Merge branch 'main' into improve-deps-main-taskfile
Bill-hbrhbr Nov 7, 2025
e75c8de
Update taskfiles/deps/README.md
Bill-hbrhbr Nov 7, 2025
12f57c1
Update taskfiles/deps/README.md
Bill-hbrhbr Nov 7, 2025
3cfd273
Remove shared libs in task installations
Bill-hbrhbr Nov 10, 2025
1ef92df
Merge branch 'main' into improve-deps-main-taskfile
Bill-hbrhbr Nov 10, 2025
6799f56
Use static libs for mongocxx and zstd
Bill-hbrhbr Nov 10, 2025
19b22ef
Turn of more shared libs building
Bill-hbrhbr Nov 10, 2025
2287560
Update README
Bill-hbrhbr Nov 10, 2025
5952c08
Merge branch 'main' into improve-deps-main-taskfile
Bill-hbrhbr Nov 10, 2025
3d44c19
Minor tweak readme
Bill-hbrhbr Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions components/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,7 @@ endif()
if(CLP_NEED_MONGOCXX)
find_package(mongocxx REQUIRED)
message(STATUS "Found mongocxx ${mongocxx_VERSION}")
if(CLP_USE_STATIC_LIBS)
set(MONGOCXX_TARGET mongo::mongocxx_static)
else()
set(MONGOCXX_TARGET mongo::mongocxx_shared)
endif()
set(MONGOCXX_TARGET mongo::mongocxx_static)
endif()

# Find and setup msgpack-cxx
Expand Down Expand Up @@ -301,20 +297,11 @@ if(CLP_NEED_ZSTD)
# v1.4.8 is the lowest version available in the package managers of the OSes we support.
find_package(zstd 1.4.8 REQUIRED)
message(STATUS "Found zstd ${zstd_VERSION}")
if(CLP_USE_STATIC_LIBS)
set(zstd_TARGET zstd::libzstd_static)
else()
set(zstd_TARGET zstd::libzstd_shared)
endif()
# TODO: replace all occurrences of `zstd_TARGET` with `zstd::libzstd`.
set(zstd_TARGET zstd::libzstd)
endif()

if(CLP_NEED_LIBLZMA)
if(CLP_USE_STATIC_LIBS)
set(LibLZMA_ROOT ${LibLZMA-static_ROOT})
set(LibLZMA_USE_STATIC_LIBS ON)
else()
set(LibLZMA_ROOT ${LibLZMA-shared_ROOT})
endif()
# Version 5.8.1 and above address CVE-2024-3094 and CVE-2025-31115.
find_package(LibLZMA 5.8.1 REQUIRED)
message(STATUS "Found LibLZMA ${LibLZMA_VERSION}")
Expand Down
96 changes: 0 additions & 96 deletions components/core/cmake/Modules/FindLibLZMA.cmake

This file was deleted.

46 changes: 46 additions & 0 deletions taskfiles/deps/README.md
Copy link
Member

Choose a reason for hiding this comment

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

possible to move this to the docs/src? if the intent of adding a README file here is to increase visibility of the docs, i believe we can change this to a simple reference to the doc page on the docs site like https://github.com/y-scope/clp/blob/main/components/webui/README.md

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Dependency Taskfiles

Follow the guidelines below when writing or updating task-based dependency installation files.

* Use one of the following tasks for CMake library installation, in descending order of preference:
* `deps:utils:install-remote-cmake-lib`
* `yscope-dev-utils:cmake:install-remote-tar`

* For special cases where the above tasks are not applicable:
* If the library can be installed via CMake but a custom approach is used, briefly document why.
* Include `deps:utils:init` in the `deps` section of the task.
* Ensure each library installation includes checksum validation to the best extent possible.
* Use of `yscope-dev-utils` tasks is encouraged, as most of them include proper checksum checks.
* Use `<lib>-extracted` as the directory name for tarball extractions.

* Avoid parsing version numbers in download URLs unless the version is used elsewhere, as URL
formats can change over time, making it more maintainable to store and use the full URL directly
as plain text.

## CMake Generate Arguments

Apply the following guidelines to the `CMAKE_GEN_ARGS` section of tasks that call
`deps:utils:install-remote-cmake-lib`:

* Set `CMP0074` to `NEW` whenever:
* The component's minimum required CMake version is less than 3.27 (where `CMP0074` defaults to
`OLD`).
* The component depends on another via `<lib_name>_ROOT`.

* Build static-only libraries whenever possible:
* If a library produces both static and shared artifacts by default, disable shared artifact
building to ensure consistent `find_package()` behavior.
* If shared artifacts cannot be disabled, explicitly link CLP targets against the static export
target (e.g., `mongo::mongocxx_static`).
* If a library cannot be statically linked (e.g., MariaDBClient due to GPL licensing), briefly
document the reason.

* Skip unit tests, examples, docs, or unused binaries to speed up the installation process.

* Prefer disabling lib-specific testing flags (e.g., `CATCH_BUILD_TESTING=OFF`) rather than setting
the generic `BUILD_TESTING` to `OFF`.

* **Lastly**, while satisfying the above requirements, remove redundant flags that merely restate
default values found in `CMakeLists.txt` and other source CMake files, with two exceptions:
* Set `CMAKE_BUILD_TYPE` to `Release` unless another build type is explicitly required.
* Set `CMAKE_INSTALL_MESSAGE` to `LAZY` to reduce log verbosity during installation.
Loading
Loading