blt icon indicating copy to clipboard operation
blt copied to clipboard

cuda dependency does not propagate into blt_add_executable

Open rrsettgast opened this issue 5 years ago • 1 comments

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?

rrsettgast avatar Nov 09 '18 19:11 rrsettgast

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.

white238 avatar Apr 18 '19 01:04 white238