Hi all,

I'm working with enabling CUDA support for the Finite Element Method library Deal.II, which includes a couple of cmake macros for the user to set up their Deal.II application. Inside one of these, I now need to correctly configure the include directories for the intermediately generated CUDA files.

Specifically, CUDA_WRAP_SRCS sets up rules for all CUDA source files, and returns a list of all generated .cu.o files which is then passed to ADD_EXECUTABLE (all this happens inside CUDA_ADD_EXECUTABLE). In Deal.II, we have until now configured the include directories by setting a property on the target application:

SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
  INCLUDE_DIRECTORIES "${DEAL_II_INCLUDE_DIRS}"
  )

Now, this does not propagate to these generated cuda .cu.o files. I tried adding a similar call like this, but with ${_target} replaced by each of the generated .o files, but then I get this error:

set_property could not find TARGET

So my question is, how can I add include directories to these generated .cu.o files ? Adding a INCLUDE_DIRECTORIES before calling CUDA_WRAP_SRCS works, but we would prefer to do something that is specific to these files and not affect the global scope. Any help is greatly appreciated!

Best regards,
Karl

--
Karl Ljungkvist
PhD student

Uppsala University
Dept. of Information Technology
Div. of Scientific Computing
Box 337
SE-751 05 Uppsala, Sweden
Email: karl.ljungkv...@it.uu.se
Phone:  +46 18 471 2967
Mobile: +46 70 2003565

--

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:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to