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!
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to