[CMake] Object library build fails due to missing include folder from linked interface library
Dustyn Blasig
dustyn at blasig.us
Mon Apr 8 16:57:23 EDT 2019
Hi All,
I have a component similar to this setup ...
project(foo LANGUAGES CXX CUDA)
add_library(foo INTERFACE)
target_include_directories(foo INTERFACE <foo_dir>)
add_library(bar OBJECT bar.cu)
target_link_libraries(bar PUBLIC foo)
When building *bar*, there is no "-I <foo_dir>" in the command line fed to
nvcc and the needed headers are therefore not available. I only see this
issue with object libraries.
I've tried using PRIVATE and INTERFACE instead of PUBLIC when defining the
link library specification for *bar *with no luck.
I'm trying to figure out if this is supposed to work, or a known limitation.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190408/1e1a5088/attachment.html>
More information about the CMake
mailing list