feat: Add flexible third-party dependency management system#104
Draft
suxiaogang223 wants to merge 1 commit intoalibaba:mainfrom
Draft
feat: Add flexible third-party dependency management system#104suxiaogang223 wants to merge 1 commit intoalibaba:mainfrom
suxiaogang223 wants to merge 1 commit intoalibaba:mainfrom
Conversation
This commit implements a flexible dependency management system that allows users to control how third-party dependencies are resolved and built. Key features: - PAIMON_DEPENDENCY_SOURCE: Global control (AUTO/BUNDLED/SYSTEM/CONDA) - Per-dependency source control via <PACKAGE>_SOURCE variables - Per-dependency location control via <PACKAGE>_ROOT variables - Unified path prefix via PAIMON_PACKAGE_PREFIX - Shared vs static library control - Find modules for Snappy, zstd, lz4, and glog Changes: - cmake_modules/DefineOptions.cmake: Add dependency management options - cmake_modules/ThirdpartyToolchain.cmake: Implement resolve_dependency() macro and build_dependency() macro - cmake_modules/Find*Alt.cmake: Add Find modules for major dependencies - docs/DependencyManagement.md: Complete documentation with examples Benefits: - Faster builds when reusing system libraries - Support for conda, vcpkg, brew, and system package managers - Better CI/CD integration - Backward compatible (defaults to AUTO mode) Relates to alibaba#103 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
17bd5f4 to
9156e28
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements a flexible third-party dependency management system for paimon-cpp, allowing users to control how dependencies are resolved and built.
Relates to #103
Key Features
1. Global Dependency Source Control
PAIMON_DEPENDENCY_SOURCE: Control all dependencies at onceAUTO(default): Try system libraries first, fall back to bundledBUNDLED: Always build from source (current behavior)SYSTEM: Use only system librariesCONDA: Use conda environment libraries2. Per-Dependency Control
<PACKAGE>_SOURCE: Override individual dependencies<PACKAGE>_ROOT: Specify installation directoryPAIMON_PACKAGE_PREFIX: Set unified path prefix3. Library Linkage Control
PAIMON_DEPENDENCY_USE_SHARED: Global shared/static controlPAIMON_<PKG>_USE_SHAREDChanges
resolve_dependency()andbuild_dependency()macrosBenefits
Example Usage
Use System Libraries
Mixed Approach
Conda Environment
Implementation Status
Currently supported dependencies with flexible resolution:
TODO (before ready for review)
Testing Checklist
References
Note: This PR is marked as draft while testing is in progress. Will mark as ready for review once all testing is complete.