Skip to content

fix: ACTS_BUILD_EXAMPLES requires ACTS_BUILD_PLUGIN_ROOT#5094

Open
AJPfleger wants to merge 4 commits intoacts-project:mainfrom
AJPfleger:cmake
Open

fix: ACTS_BUILD_EXAMPLES requires ACTS_BUILD_PLUGIN_ROOT#5094
AJPfleger wants to merge 4 commits intoacts-project:mainfrom
AJPfleger:cmake

Conversation

@AJPfleger
Copy link
Contributor

Examples needs the Root Plugin to build.

with

cmake -S acts -B build \
  -DACTS_BUILD_EXAMPLES=ON

I get the error

CMake Error at Examples/Detectors/TGeoDetector/CMakeLists.txt:14 (target_link_libraries):
  Target "ActsExamplesDetectorTGeo" links to:

    Acts::PluginRoot

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at Examples/Io/Root/CMakeLists.txt:37 (target_link_libraries):
  Target "ActsExamplesIoRoot" links to:

    Acts::PluginRoot

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

@AJPfleger AJPfleger added this to the next milestone Feb 11, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

📊: Physics performance monitoring for a8f1d8e

Full contents

physmon summary

@paulgessinger
Copy link
Member

@benjaminhuth

@benjaminhuth
Copy link
Member

Thanks for pointing that out... I just changed that in #5032 so that examples depends not necessarily on ROOT.
The reason the build fails is that ACTS_BUILD_EXAMPLES_ROOT defaults to ON, which I overlooked in #5032.

So there are several options:

  • Set ACTS_BUILD_EXAMPLES_ROOT=OFF by default
  • Set set_option_if(ACTS_BUILD_PLUGIN_ROOT ACTS_BUILD_EXAMPLES_ROOT)
  • Remove the ACTS_BUILD_EXAMPLES_ROOT and only have ACTS_BUILD_PLUGIN_ROOT, so that we get the behaviour with ACTS_BUILD_EXAMPLES AND ACTS_BUILD_PLUGIN_ROOT (actually I'm slightly leaning towards that, although there is ROOT functionality in Examples unrelated to the plugin.

Any opinions @andiwand @paulgessinger @AJPfleger?

@AJPfleger
Copy link
Contributor Author

I feel the 2nd option feels most natural to me.
1st is not really what I would expect, when building all examples.
But no strong preference between 2nd and 3rd.

@benjaminhuth
Copy link
Member

Okay, let's go with option 2 for now since it is also the least intrusive change

Copy link
Member

@benjaminhuth benjaminhuth left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@paulgessinger
Copy link
Member

Docs failure seems to be real, @AJPfleger can you look into it?

@sonarqubecloud
Copy link

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.

3 participants