Skip to content

Set format install to fix git repo builds - #4143

Merged
paulromano merged 1 commit into
openmc-dev:developfrom
nuclearkevin:fix_cardinal_build
Sep 20, 2026
Merged

paulromano merged 1 commit into
openmc-dev:developfrom
nuclearkevin:fix_cardinal_build

Conversation

@nuclearkevin

@nuclearkevin nuclearkevin commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Description

When providing fmt (in a git repo) to OpenMC with FetchContent, a build failure is encountered with the following error message:

CMake Error: install(EXPORT "openmc-targets" ...) includes target "libopenmc_objects" which requires target "fmt" that is not in any export set.

This is caused by fmt not generating an install target when it is included as a subproject. Adding set(FMT_INSTALL ON) before fetching fmt fixes the build error.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 18) 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)

@paulromano paulromano 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 @nuclearkevin!

@paulromano
paulromano merged commit 21d0b2f into openmc-dev:develop Sep 20, 2026
19 checks passed
@nuclearkevin
nuclearkevin deleted the fix_cardinal_build branch September 21, 2026 00:31
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