-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor CMake #90
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
Draft
victor1234
wants to merge
84
commits into
main
Choose a base branch
from
refactor-cmake
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Refactor CMake #90
Conversation
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.
Why?
CMake
doesn't properly use targetsWhat?
CMake
scriptsCI
vcpkg
supportDetails
concurrentqueue
include path for dependency managerscpp-httplib
viapkg-config
vcpkg
supportREDUCT_CPP_USE_FETCHCONTENT
optionREDUCT_CPP_USE_CONAN
FetchContent
support to examplesreductcpp-config.cmake.in
template with proper dependency findersReductCppConfigVersion.cmake.in
; let CMake generate itInstallDependencies
consistent across different dependency sourcesREADME.md
example
usageactionlint
topre-commit
hooksThis pull request introduces significant updates to the build system, dependency management, and CI workflows for the project. The changes include the addition of FetchContent for dependency management, new actions for Conan and vcpkg integration, updates to the CMake configuration, and enhancements to the CI pipeline. These changes aim to improve flexibility, streamline dependency handling, and modernize the build process.
Build System and Dependency Management Improvements:
REDUCT_CPP_USE_FETCHCONTENT
to enable FetchContent for managing dependencies, replacing the previous Conan-based approach. This allows automatic downloading of dependencies likefmt
,nlohmann_json
, andhttplib
when FetchContent is enabled (CMakeLists.txt
,cmake/InstallDependencies.cmake
, [1] [2].CMAKE_TOOLCHAIN_FILE
and integrating vcpkg dependencies (CMakeLists.txt
,cmake/InstallDependencies.cmake
, CMakeLists.txtL8-R71).cmake/InstallDependencies.cmake
, cmake/InstallDependencies.cmakeL67-R107).New GitHub Actions for Build and Dependency Management:
build-package-conan
) and vcpkg (build-package-vcpkg
) to support multiple dependency management approaches (.github/actions/build-package-conan/action.yml
,.github/actions/build-package-vcpkg/action.yml
, [1] [2]..github/actions/install-vcpkg/action.yml
, .github/actions/install-vcpkg/action.ymlR1-R21).CI Workflow Enhancements:
cpplint
job in the CI workflow to correctly handle file paths with spaces using-print0
andxargs -0
(.github/workflows/ci.yml
, .github/workflows/ci.ymlL18-R130).check-example
job by focusing on Linux builds and removing redundant configurations (.github/workflows/ci.yml
, .github/workflows/ci.ymlL18-R130)..github/workflows/ci.yml
, .github/workflows/ci.ymlL18-R130).CMake Configuration Updates:
std::chrono
or thedate
library based on theREDUCT_CPP_USE_STD_CHRONO
flag (CMakeLists.txt
,cmake/InstallDependencies.cmake
, [1] [2].reductcpp-config.cmake.in
file to modernize the CMake configuration for downstream projects (cmake/reductcpp-config.cmake.in
, cmake/reductcpp-config.cmake.inR1-R24).cmake/ReductCppConfig.cmake.in
,cmake/ReductCppConfigVersion.cmake.in
, [1] [2].Documentation Updates:
README.md
, [1] [2].These updates collectively enhance the project's build system, improve flexibility in dependency management, and modernize the CI pipeline for better maintainability and scalability.