Conversation
CMake 3.27 introduced CMP0144, which changes how upper-case package name variables are handled in find_package. Setting the policy to NEW suppresses deprecation warnings.
|
| Scope | Lines Δ | Lines + | Lines - | Files Δ | Files + | Files ~ | Files ↔ | Files - |
|---|---|---|---|---|---|---|---|---|
| 🏗️ Build / Toolchain | 17 | 11 | 6 | 2 | - | 2 | - | - |
| 📄 Docs | 2 | - | 2 | 1 | - | 1 | - | - |
| Total | 19 | 11 | 8 | 3 | - | 3 | - | - |
Legend: Files + (added), Files ~ (modified), Files ↔ (renamed), Files - (removed)
🔝 Top Files
- CMakeLists.txt (Build / Toolchain): 15 lines Δ (+10 / -5)
- docs/package-lock.json (Docs): 2 lines Δ (+0 / -2)
- util/bootstrap/src/recipes/loader.py (Build / Toolchain): 2 lines Δ (+1 / -1)
|
An automated preview of the documentation is available at https://1166.mrdocs.prtest2.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-03-16 11:52:16 UTC |
The LLVM CMakePresets use "win" (e.g. release-win, debug-win), not "windows". The incorrect suffix caused preset lookup failures when bootstrapping on Windows.
Remove stale peer dependency markers for @asciidoctor/core and progress.
b3a9ba4 to
5a5f4da
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1166 +/- ##
========================================
Coverage 77.44% 77.44%
========================================
Files 313 313
Lines 29475 29475
Branches 5880 5880
========================================
Hits 22827 22827
Misses 4403 4403
Partials 2245 2245 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
On Windows, bootstrap.py installs LibXml2 with a CMake config package, so find_package() only succeeds in CONFIG mode. On Linux, system libxml2-dev is found via CMake's FindLibXml2 module. So, try config mode first; fall back to module mode if that fails.
| find_package(LibXml2) | ||
| # Try config mode first (e.g. libxml2 installed by bootstrap.py), | ||
| # then fall back to module mode (e.g. system libxml2-dev on Linux). | ||
| find_package(LibXml2 CONFIG) |
There was a problem hiding this comment.
I'm not sure, but I think there's a way to make config fall back to regular mode. If so, it would be more like:
if (MRDOCS_BUILD_STRICT_TESTS)
# Strict mode expects xml-lint to run; require LibXml2.
find_package(LibXml2 CONFIG REQUIRED)
else()
find_package(LibXml2 CONFIG)
endif()
If we use this pattern often, we can also create a REQUIRED_IF_STRICT_TESTS variable.
There was a problem hiding this comment.
We could do:
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
if (MRDOCS_BUILD_STRICT_TESTS)
find_package(LibXml2 REQUIRED)
else()
find_package(LibXml2)
endif()
The variable is documented since CMake 3.15. MrDocs requires CMake >= 3.13, though, so we'd need to check if 3.15 is acceptable; but, realistically, any current toolchain has it.
Downside: CMAKE_FIND_PACKAGE_PREFER_CONFIG is global, so it would affect all subsequent find_package calls in the same scope. We could use a save/restore.
There was a problem hiding this comment.
Exactly. Great idea.
I'm looking at this again, and I suspect #1168 will end up obsoleting this PR, though. Because the new bootstrap script had to cover all of that to actually work in CI. So it had to fix the root of the problem.
No description provided.