Skip to content

Accept only the same minor version of DOLFINx and UFCxPython in CMake - #4661

Merged
jhale merged 2 commits into
mainfrom
jhale/cmake-same-minor-version
Oct 18, 2026
Merged

jhale merged 2 commits into
mainfrom
jhale/cmake-same-minor-version

Conversation

@jhale

@jhale jhale commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

DOLFINXConfigVersion.cmake used COMPATIBILITY AnyNewerVersion, so a downstream find_package(DOLFINX 0.12) accepts DOLFINx 0.13. The SOVERSION is major.minor, so a new minor is ABI-incompatible. SameMinorVersion makes CMake match. FEniCS/basix#1103 and FEniCS/ffcx#922 make the same change in Basix and ufcx.

#2358 switched from ExactVersion to AnyNewerVersion because SameMinorVersion didn't support version ranges. That was true in CMake 3.19, which used only the lower endpoint. Since CMake 3.21 it supports them, and the minimum here is 3.26. I checked with CMake 4.4: requests for 0.12 and 0.12...<0.13 both accept 0.12.0.0, 0.12.0 and 0.12.1, and both reject 0.13.0.

FindUFCxPython is a find module, so find_package_handle_standard_args accepts any newer FFCx for find_package(UFCxPython 0.12). It already declares HANDLE_VERSION_RANGE, so the call now requests 0.12...<0.13. I ran the module against FFCx main (0.12.0.dev0). It accepts 0.12...<0.13, and rejects 0.11...<0.12 and 0.13...<0.14 with "Found unsuitable version". FEniCS/ffcx#922 makes the ufcx config change.

Within this repository nothing requests a DOLFINx version: the demos, tests and Python layer call find_package(DOLFINX REQUIRED), which still matches any version.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JudYk8UecTQyirGsLsHUN2

AnyNewerVersion lets find_package(DOLFINX 0.12) accept DOLFINx 0.13,
whose SOVERSION is ABI-incompatible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JudYk8UecTQyirGsLsHUN2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JudYk8UecTQyirGsLsHUN2
@jhale jhale changed the title Accept only the same minor version in DOLFINXConfigVersion.cmake Accept only the same minor version of DOLFINx, Basix and UFCx in CMake Oct 18, 2026
@jhale jhale changed the title Accept only the same minor version of DOLFINx, Basix and UFCx in CMake Accept only the same minor version of DOLFINx and UFCxPython in CMake Oct 18, 2026
@jhale
jhale added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 15e9bd5 Oct 18, 2026
22 checks passed
@jhale
jhale deleted the jhale/cmake-same-minor-version branch October 18, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant