Conversation
Update build system to use Conan 2 generators (CMakeToolchain, CMakeDeps, MakeDeps), modern CMake find_package pattern, and Conan 2 CLI commands across all CI workflows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Migrates the project’s dependency/build integration from Conan 1 to Conan 2 by switching to Conan 2 generators and updating the CMake/Make/CI wiring accordingly.
Changes:
- Updated
conanfile.txtgenerators to Conan 2 (CMakeToolchain,CMakeDeps,MakeDeps). - Modernized
CMakeLists.txtto usefind_package()+ imported targets instead ofconan_basic_setup(). - Updated CI workflows to use Conan 2 CLI (
conan profile detect,conan install --build=missing, toolchain file).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
conanfile.txt |
Switches to Conan 2 generators for CMake and Make integration. |
Makefile |
Attempts to consume Conan 2 make deps via conandeps.mak. |
CMakeLists.txt |
Replaces Conan 1 CMake integration with find_package() and target-based linking. |
CHANGELOG.md |
Notes Conan 2 migration in changelog. |
.github/workflows/main.yml |
Updates CI to install/use Conan 2 and pass the generated CMake toolchain. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| find_package(PNG REQUIRED) | ||
| find_package(ZLIB REQUIRED) |
There was a problem hiding this comment.
find_package(PNG)/find_package(ZLIB) without CONFIG will prefer CMake’s built-in Find modules when available, which can cause the build to link against system libraries instead of the Conan-resolved ones. To ensure Conan’s CMakeDeps packages are used consistently, use find_package(PNG CONFIG REQUIRED) and find_package(ZLIB CONFIG REQUIRED) (or set CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON).
| find_package(PNG REQUIRED) | |
| find_package(ZLIB REQUIRED) | |
| find_package(PNG CONFIG REQUIRED) | |
| find_package(ZLIB CONFIG REQUIRED) |
| apt-get update && apt-get install -y -q wget python3 python3-dev libpng-dev | ||
| wget https://bootstrap.pypa.io/pip/get-pip.py && PIP_BREAK_SYSTEM_PACKAGES=1 python3 get-pip.py | ||
| pip3 install --break-system-packages --upgrade "conan<2" urllib3 | ||
| conan install . --build | ||
| pip3 install --break-system-packages --upgrade "conan>=2,<3" urllib3 | ||
| conan profile detect --force | ||
| conan install . --build=missing |
There was a problem hiding this comment.
This job installs libpng-dev while also using Conan + CMakeDeps. Combined with find_package(PNG) (module mode), this can cause CMake to resolve PNG from the system rather than Conan, undermining the Conan 2 migration and risking mismatched dependency versions. Consider removing libpng-dev here (and relying on Conan), or force config-mode find_package(... CONFIG ...) so Conan’s packages win.
| @@ -1,4 +1,4 @@ | |||
| -include conanbuildinfo.mak | |||
| -include conandeps.mak | |||
There was a problem hiding this comment.
The Makefile now includes conandeps.mak, but the rest of the Makefile still consumes legacy Conan 1 CONAN_* variables (CONAN_CFLAGS, CONAN_INCLUDE_DIRS, CONAN_LIBS, etc.). Conan 2’s MakeDeps generator emits a different set of variables, so simply swapping the included filename is unlikely to make Conan-based make builds pick up the right flags/paths. Update the Makefile to use the variables produced by MakeDeps (or switch generators to match the existing CONAN_* usage).
Conan 2's CMakeDeps generator requires CMAKE_BUILD_TYPE to be set when using single-config generators (Make). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only link against Python when PythonLibs is found, preventing NOTFOUND errors on environments without Python dev headers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
conanfile.txtgenerators:make/cmake→CMakeToolchain/CMakeDeps/MakeDepsCMakeLists.txt: replacedconan_basic_setup()withfind_package()and CMake targets (PNG::PNG,ZLIB::ZLIB)Makefileto includeconandeps.mak(Conan 2) instead ofconanbuildinfo.mak(Conan 1)conan profile detect,conan install --build=missing,CMAKE_TOOLCHAIN_FILE)Test plan
🤖 Generated with Claude Code