Skip to content

fix: CMake Code Usage Fix, main branch (2026.02.24.)#5159

Draft
krasznaa wants to merge 1 commit intoacts-project:mainfrom
krasznaa:CMakeModulePathFix-main-20260224
Draft

fix: CMake Code Usage Fix, main branch (2026.02.24.)#5159
krasznaa wants to merge 1 commit intoacts-project:mainfrom
krasznaa:CMakeModulePathFix-main-20260224

Conversation

@krasznaa
Copy link
Copy Markdown
Member

Made sure that CMake would always select the find-modules present in cmake/ over modules provided by either CMake or the parent project that builds Acts.

--- END COMMIT MESSAGE ---

I bumped into this as part of: https://gitlab.cern.ch/atlas/athena/-/merge_requests/86291 That since AthenaExternals also provides a Findonnxruntime.cmake module (https://gitlab.cern.ch/atlas/atlasexternals/-/blob/main/External/onnxruntime/cmake/Findonnxruntime.cmake?ref_type=heads) that behaves differently from the one provided by this project, using FetchContent on top of the Athena project was not working out of the box. 😦

Pinging @murnanedaniel and @benjaminhuth.

@krasznaa krasznaa marked this pull request as draft February 24, 2026 14:25
@krasznaa
Copy link
Copy Markdown
Member Author

Though, thinking about it, this may not be a perfect setup either. 😦

You see, anything that Acts needs from LCG in the ATLAS build (like Boost for instance) does need the find-module provided by ATLAS. 🤔 So maybe we just need to accept that the build would be this fragile as part of https://gitlab.cern.ch/atlas/athena/-/blob/main/Projects/WorkDir/ActsOverride.cmake?ref_type=heads. 😦 I wonder if it's just Findonnxruntime.cmake that's duplicated like this between Acts and AtlasLCG. 🤔 I'd be very okay with somebody other than me looking this up / sorting this out.

@paulgessinger, let me tag you as well...

@benjaminhuth
Copy link
Copy Markdown
Member

Yeah I think the root cause of this that there is no general way on how to configure ONNX in cmake, but that each package needs to provide its on finding which are not necessarily compatible...

I think the other possible solution would be to align the cmake finding code, but this is also not great since this could diverge over time again... So probably its the best solution to just hardcode it in the ATLAS build...

@github-actions github-actions bot added this to the next milestone Feb 24, 2026
@sonarqubecloud
Copy link
Copy Markdown

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