Skip to content

FIX: Install public headers under include/dagmc/ - #998

Merged
gonuke merged 1 commit into
svalinn:developfrom
matthewfeickert:fix/use-namespace-includes
Sep 3, 2026
Merged

gonuke merged 1 commit into
svalinn:developfrom
matthewfeickert:fix/use-namespace-includes

Conversation

@matthewfeickert

Copy link
Copy Markdown
Contributor

Description

Namespace the installed headers under include/dagmc/ instead of the top level of the install prefix's include directory, following the include/<project>/ convention of DAGMC's dependencies (e.g. MOAB, Eigen). This avoids collisions and silent wrong-header resolution when DAGMC shares an install prefix with other packages (e.g. DAGMC's installed pyne.h vs. PyNE's include/pyne/pyne.h in a conda environment).

The exported CMake package config follows automatically. The imported targets' INSTALL_INTERFACE include directories, DAGMC_INCLUDE_DIRS, and the make_watertight subdirectory headers all derive from INSTALL_INCLUDE_DIR. The previous layout can be restored by configuring with -DINSTALL_INCLUDE_DIR=include.

Assisted-by: ClaudeCode:claude-fable-5

Motivation and Context

Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

Resolves #997

Changes

What kind of change does this PR introduce? (Bug fix, feature, documentation update...)

A bug fix in the sense that it avoids future user bugs.

Behavior

What is the current behavior? What is the new behavior?

  • Current behavior: Install all headers under project include/.
  • New behavior: Install headers under namespaced directory of include/dagmc/

Other Information

N/A

Changelog file

All pull requests are required to update the CHANGELOG file with the PR. Your update can take different forms including:

  • creating a new entry describing your change, including a reference to this pull request number
  • adding a reference to your pull request number to an exist entry if that entry can include your changes

Completed in PR.

Namespace the installed headers under include/dagmc/ instead of the top
level of the install prefix's include directory, following the
include/<project>/ convention of DAGMC's dependencies (e.g. MOAB,
Eigen). This avoids collisions and silent wrong-header resolution when
DAGMC shares an install prefix with other packages (e.g. DAGMC's
installed pyne.h vs. PyNE's include/pyne/pyne.h in a conda
environment).

The exported CMake package config follows automatically. The imported
targets' INSTALL_INTERFACE include directories, DAGMC_INCLUDE_DIRS, and
the make_watertight subdirectory headers all derive from
INSTALL_INCLUDE_DIR. The previous layout can be restored by configuring
with -DINSTALL_INCLUDE_DIR=include.

Assisted-by: ClaudeCode:claude-fable-5
@matthewfeickert

Copy link
Copy Markdown
Contributor Author

This is ready for review.

@gonuke gonuke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @matthewfeickert - this seems reasonable.

@gonuke
gonuke merged commit 3b46ba3 into svalinn:develop Sep 3, 2026
19 checks passed
@matthewfeickert
matthewfeickert deleted the fix/use-namespace-includes branch September 3, 2026 15:32
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.

Install public headers under a namespaced include directory (include/dagmc/)

2 participants