Skip to content

MNT: Use policy_max in cmake_minimum_required - #51

Merged
pshriwise merged 1 commit into
pshriwise:developfrom
matthewfeickert:mnt/update-cmake-versions
Feb 13, 2026
Merged

MNT: Use policy_max in cmake_minimum_required#51
pshriwise merged 1 commit into
pshriwise:developfrom
matthewfeickert:mnt/update-cmake-versions

Conversation

@matthewfeickert

@matthewfeickert matthewfeickert commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Relevant for:


Example Pixi manifest that will build the project using the state of this PR:

[workspace]
channels = ["conda-forge"]
name = "double-down"
platforms = ["linux-64", "osx-arm64"]
version = "0.1.0"

[tasks.build]
cmd = """
rm -rf ./build && \
cmake $CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -S . -B build && \
cmake build -LH && \
cmake --build build --clean-first --parallel "$(nproc -- ignore=2)" && \
ctest --test-dir build --output-on-failure && \
cmake --install build
"""

[dependencies]
cxx-compiler = ">=1.11.0,<2"
cmake = ">=4.2.3,<5"
make = ">=4.4.1,<5"
moab = ">=5.6.0,<6"
embree = ">=4.4.0,<5"
eigen = ">=3.4.0,<4"
$ pixi run build

* Set policy_max which defines the maximum CMake policy. cmake_minimum_required
  sets two minimums: the real (lower) minimum and the (upper) minimum based on
  has been tested with. The defaults (CMake policies) will be set to the highest
  value possible between the two values.
   - c.f. https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
@matthewfeickert

Copy link
Copy Markdown
Contributor Author

👋 @pshriwise this is ready for review. Let me know if you have any questions.

@pshriwise pshriwise left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thank you for the update @matthewfeickert 👍🏻

@pshriwise
pshriwise merged commit f7f91e2 into pshriwise:develop Feb 13, 2026
2 checks passed
@matthewfeickert
matthewfeickert deleted the mnt/update-cmake-versions branch February 13, 2026 20:12
@matthewfeickert

Copy link
Copy Markdown
Contributor Author

Thanks for the fast review and merge, @pshriwise. Can I also have you look at conda-forge/staged-recipes#32181 (which motivated this PR)?

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.

2 participants