Skip to content

CMakeLists.txt: larsim dependency EXPORT'ed, removed unused dk2nugenie - #684

Merged
hgreenlee merged 1 commit into
SBNSoftware:developfrom
PetrilloAtWork:feature/gp_dk2nugenieSol3
Nov 2, 2026
Merged

hgreenlee merged 1 commit into
SBNSoftware:developfrom
PetrilloAtWork:feature/gp_dk2nugenieSol3

Conversation

@PetrilloAtWork

Copy link
Copy Markdown
Member

dk2nugenie is not used in sbncode codebase; however, it was EXPORT'ed so that dependent repositories could use it without explicitly including¹ it. CMake's dk2nugenie finding function is provided in nufinder package, which was not included: sbncode relied on other dependencies (namely, larsim) to export it.
However larsim dependency is not EXPORT'ed.
The net result is that sbncode builds, but a package including only sbncode won't: since sbncode exports dk2nugenie, CMake implicitly tries to import it; but nufinder is not implicitly imported, so importing dk2nugenie will fail. nufinder may happen to be indirectly imported by other packaged (larsim above), in which case building still forks. Otherwise, a CMake error occurs.

This commit removes dk2nugenie explicit import since it is not used directly. To make sure that dependent packages can keep using it without breakage, larsim itself is EXPORT'ed.

This change was tested by building sbncode and then using the resulting UPS product to build icaruscode with explicit dependency on it.

Note: this problem was the cause of merge failure of SBNSoftware/icaruscode#922, which for the first time introduced a CMake dependency on sbncode.

Reviewers:

  • @hgreenlee as SBN release manager (this solution was discussed with him)
  • @kjplows as ICARUS release manager, also to keep him informed about the progress

[1] Here, "explicitly including" means to have a find_package() call in CMakeLists.txt.

dk2nugenie is not used in sbncode codebase; however, it was EXPORTed
so that dependent repositories could use it without explicitly including it.
CMake's dk2nugenie finding function is provided in nufinder package,
which was not included: sbncode relied on other dependencies (namely, larsim)
to export it.
However larsim dependency is not EXPORTed.

The net result is that sbncode builds, but a package including only sbncode won't:
since sbncode exports dk2nugenie, CMake implicitly tries to import it;
but nufinder is not implicitly imported, so importing dk2nugenie will fail.
nufinder may happen to be indirectly imported by other packaged (larsim above),
in which case building still forks. Otherwise, a CMake error occurs.

This commit removes dk2nugenie explicit import since it is not used directly.
To make sure that dependent packages can keep using it without breakage,
larsim itself is EXPORTed.
@PetrilloAtWork PetrilloAtWork self-assigned this Nov 2, 2026
@PetrilloAtWork PetrilloAtWork added the bug Something isn't working label Nov 2, 2026
@kjplows

kjplows commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Hi, @jas1005 is ICARUS RM - keeping them in the loop!

@hgreenlee
hgreenlee merged commit 6644a2b into SBNSoftware:develop Nov 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants