Skip to content

Make realm_kokkos look for generated headers in project binary dir - #472

Merged
lightsighter merged 1 commit into
StanfordLegion:mainfrom
mpokorny:rkgenerated
Aug 25, 2026
Merged

Make realm_kokkos look for generated headers in project binary dir#472
lightsighter merged 1 commit into
StanfordLegion:mainfrom
mpokorny:rkgenerated

Conversation

@mpokorny

Copy link
Copy Markdown
Contributor

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.

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

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.41%. Comparing base (3c47fec) to head (7101235).
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

@lightsighter

Copy link
Copy Markdown
Contributor

@mpokorny are you ready for this to merge now?

@elliottslaughter

Copy link
Copy Markdown
Contributor

Legion CI looks good, happy to take this on my end: https://gitlab.com/StanfordLegion/legion/-/pipelines/2790006800

@mpokorny

Copy link
Copy Markdown
Contributor Author

Should be good to merge, according to my tests.

@lightsighter
lightsighter merged commit bf26209 into StanfordLegion:main Aug 25, 2026
23 checks passed
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