Skip to content

Fix missing BUILD_INTERFACE include dirs on in-tree libxc's xc target - #83

Merged
ryanmrichard merged 1 commit into
masterfrom
fix/libxc-build-interface-include
Sep 4, 2026
Merged

Fix missing BUILD_INTERFACE include dirs on in-tree libxc's xc target#83
ryanmrichard merged 1 commit into
masterfrom
fix/libxc-build-interface-include

Conversation

@ryanmrichard

Copy link
Copy Markdown
Member

Summary

  • libxc's own CMakeLists only wires its generated headers (build-tree xc.h, xc_version.h, config.h) onto its directory-scoped include_directories(), and only publishes an INSTALL_INTERFACE on the xc target -- fine for a find_package(Libxc CONFIG)-imported Libxc::xc, but the in-tree FetchContent xc target carries no build-tree include path for any consumer outside libxc's own CMakeLists.
  • Reproduced live as NWChemEx/SCF#71's CI failure (xc.h: file not found) on a from-scratch build with no pre-existing libxc install anywhere to mask it -- this had originally looked like a stale GitHub Actions cache issue, but persisted after clearing the cache, pointing to this underlying bug instead.
  • Adds the missing BUILD_INTERFACE include dirs on the xc target, matching libxc's own include_directories() call exactly.

Test plan

  • Locally reconfigured/built SCF from scratch (fresh FetchContent tree, -DCMAKE_DISABLE_FIND_PACKAGE_Libxc=ON to force the in-tree path, editable-installed NWXCMake picking up this fix) -- cxx/src/scf/xc/libxc/libxc.cpp compiled and libscf.dylib linked successfully.
  • Confirm SCF PR Fix broken FetchContent: point integrals and nux at master #71's CI goes green once this merges (NWXCMake is fetched at its default branch HEAD, no pinned tag, so the fix applies automatically on the next CI run).

🤖 Generated with Claude Code

libxc's own CMakeLists only adds its generated-header directories
(build-tree xc.h, xc_version.h, config.h) via directory-scoped
include_directories(), and only publishes an INSTALL_INTERFACE on the
xc target -- fine for an installed Libxc::xc, but leaves the in-tree
FetchContent target with no build-tree include path for any consumer
outside libxc's own CMakeLists. Reproduced as SCF PR #71's CI failure
("xc.h: file not found") on a from-scratch build with no pre-existing
libxc install to mask it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ryanmrichard
ryanmrichard merged commit fba46ff into master Sep 4, 2026
8 checks passed
@ryanmrichard
ryanmrichard deleted the fix/libxc-build-interface-include branch September 4, 2026 14:48
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

🚀 [bumpr] Bumped!
New version:v0.0.23
Changes:v0.0.22...v0.0.23

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