Issue with dependency propagation for object libraries
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 296
- Forks
- 66
- Avg merge
- 1h 3m
- Merged PRs (30d)
- 1
Description
There might be a bug with how `blt_add_library` propagates dependencies for object libraries.
My specific case is for an object library that depends on an imported library with its own internal dependencies.
Specifically, I have an `axom` configuration that depends on `RAJA` with `RAJA_ENABLE_ROCTX = ON`.
* The RAJA import has a `RAJA` target that depends on the `RAJA::roctx` target.
* Axom's `core` component is an object library. When invoking `blt_add_library`, it gets the `RAJA` dependency, but does not eventually get include paths from `RAJA::roctx`
#### Details and links:
* `RAJA_ENABLE_ROCTX` option: https://github.com/LLNL/RAJA/blob/093bc446fdde333749a13ceca262c09ca3ad1049/cmake/SetupRajaOptions.cmake#L12
* Axom's setup for the `core` component: https://github.com/LLNL/axom/blob/1f86e245684480c1d9bcfe88f50011b0bb280e6d/src/axom/core/CMakeLists.txt#L96-L116
* Partial dependency setup for object libraries in `blt_add_library`: https://github.com/LLNL/blt/blob/8c229991e65e7a9603c621b47cb3ba158bb7468c/cmake/BLTMacros.cmake#L635-L646
* More dependency setup in `blt_add_library`: https://github.com/LLNL/blt/blob/8c229991e65e7a9603c621b47cb3ba158bb7468c/cmake/BLTMacros.cmake#L691-L693
* Possibly relevant: `blt_expand_dependencies` only applies to (pseudo)-targets created by `blt_register_library`: https://github.com/LLNL/blt/blob/8c229991e65e7a9603c621b47cb3ba158bb7468c/cmake/BLTPrivateMacros.cmake#L329-L339
* Temporary workaround in axom: https://github.com/LLNL/axom/pull/1002
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in cmake/BLTMacros.cmake at the object-library dependency setup around lines 635-646 and 691-693, then read blt_expand_dependencies in cmake/BLTPrivateMacros.cmake around lines 329-339. Reproduce the Axom core and RAJA_ENABLE_ROCTX configuration described in the issue. Done means an object library receives include paths from transitive dependencies such as RAJA::roctx.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100