Make realm_kokkos look for generated headers in project binary dir - #472
Merged
Conversation
realm_kokkos looks for the generated headers (realm_defines.h) in
${CMAKE_BINARY_DIR}/include, i.e. the top-level project's binary dir.
The headers are generated into Realm's own binary dir
(${PROJECT_BINARY_DIR}/include, see src/CMakeLists.txt), which every
other Realm target references via ${CMAKE_CURRENT_BINARY_DIR}/include.
The two coincide when Realm is the top-level project, but differ when
Realm is built as a subproject — e.g. Legion's integrated build, which
adds the vendored realm/ subtree via CPM into _deps/realm-build. In
that configuration any build with REALM_ENABLE_KOKKOS=ON fails:
realm/src/realm/../realm/realm_config.h:25:10: fatal error:
realm_defines.h: No such file or directory
Use PROJECT_BINARY_DIR to agree with where the headers are generated
regardless of project nesting.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #472 +/- ##
========================================
Coverage 30.41% 30.41%
========================================
Files 199 199
Lines 41282 41282
Branches 14810 14942 +132
========================================
Hits 12554 12554
- Misses 27759 28273 +514
+ Partials 969 455 -514 ☔ View full report in Codecov by Harness. |
lightsighter
approved these changes
Aug 25, 2026
Contributor
|
@mpokorny are you ready for this to merge now? |
Contributor
|
Legion CI looks good, happy to take this on my end: https://gitlab.com/StanfordLegion/legion/-/pipelines/2790006800 |
elliottslaughter
approved these changes
Aug 25, 2026
Contributor
Author
|
Should be good to merge, according to my tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
realm_kokkos looks for the generated headers (realm_defines.h) in ${CMAKE_BINARY_DIR}/include, i.e. the top-level project's binary dir. The headers are generated into Realm's own binary dir (${PROJECT_BINARY_DIR}/include, see src/CMakeLists.txt), which every other Realm target references via ${CMAKE_CURRENT_BINARY_DIR}/include. The two coincide when Realm is the top-level project, but differ when Realm is built as a subproject — e.g. Legion's integrated build, which adds the vendored realm/ subtree via CPM into _deps/realm-build. In that configuration any build with REALM_ENABLE_KOKKOS=ON fails:
realm/src/realm/../realm/realm_config.h:25:10: fatal error:
realm_defines.h: No such file or directory
Use PROJECT_BINARY_DIR to agree with where the headers are generated regardless of project nesting.