blt
blt copied to clipboard
cuda dependency does not propagate into blt_add_executable
If you have a lib that depends on cuda:
blt_add_library( NAME mylib DEPENDS_ON cuda )
and a executable that depends on mylib:
blt_add_executable( NAME myex DEPENDS_ON mylib)
then myex doesn't inherit the cuda dependency from mylib...and bad things happen.
This is because the code here: https://github.com/LLNL/blt/blob/062ee3ff58e23713b9cd4d2daa2f9b5fca02d3bc/cmake/BLTMacros.cmake#L604 doesn't expand the dependencies. maybe the solution is to have a macro to expand the dependencies and use it prior to this check?
This should be easy to fix because we already have the logic to expand DEPENDS_ON in blt_setup_target() it could be pulled out and used here.