Skip to content

Update find_package calls in OpenMCConfig.cmake - #3572

Merged
pshriwise merged 5 commits into
openmc-dev:developfrom
paulromano:update-cmake-config
Sep 23, 2025
Merged

pshriwise merged 5 commits into
openmc-dev:developfrom
paulromano:update-cmake-config

Conversation

@paulromano

Copy link
Copy Markdown
Contributor

Description

I noticed recently that installs of xtensor/xtl go into a different directory than the one that is indicated by the HINT in OpenMCConfig.cmake.in. Namely, currently it assumes that the xtensor/xtl cmake files get installed in lib/cmake/xtensor and lib/cmake/xtensor, whereas it is actually getting installed to share/cmake/xtensor and share/cmake/xtl. Both of them seem to be common locations for installing *.cmake files, so it's hard to say what is "correct". In this PR, I've updated the find_package calls to instead give a HINT to the prefix where OpenMC was installed, which by CMake search rules will include both lib/cmake and share/cmake. It seems we've just been getting lucky in CI because everything is installed to /usr/local, which is found by other means.

A few other miscellaneous fixes in this PR:

  • Fix a few typos
  • Close matplotlib figures in tests to avoid a warning
  • Fix a deprecated use of wwinp_to_wws in one test

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@pshriwise pshriwise left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @paulromano! I like the new approach. We'll keep this in mind for future CMake packaging.

@pshriwise
pshriwise merged commit 8f36ff2 into openmc-dev:develop Sep 23, 2025
14 checks passed
@paulromano
paulromano deleted the update-cmake-config branch September 27, 2025 02:52
Grego01-biot pushed a commit to Grego01-biot/openmc that referenced this pull request Oct 27, 2025
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
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