blt
blt copied to clipboard
Issue with dependency propagation for object libraries
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 theRAJA::roctx
target. - Axom's
core
component is an object library. When invokingblt_add_library
, it gets theRAJA
dependency, but does not eventually get include paths fromRAJA::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 byblt_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