[CMake] isystem include of system library header with CUDA

Osuna Escamilla Carlos carlos.osuna at env.ethz.ch
Sun Feb 14 13:33:07 EST 2016


Hi everybody

with cmake I have always used the SYSTEM keyword for the include_directories to include system libraries:

include_directories( SYSTEM ${Boost_INCLUDE_DIRS} )

in order to pass system include directories with compiler with -isystem.
The problem I have is that this does not seem to work with CUDA.

In FindCUDA.cmake, it seems that -I is hardcoded

  if(CUDA_NVCC_INCLUDE_DIRECTORIES)
    foreach(dir ${CUDA_NVCC_INCLUDE_DIRECTORIES})
      list(APPEND CUDA_NVCC_INCLUDE_ARGS -I${dir})
    endforeach()
  endif()

So the question is am I right? Or am I assuming something wrong?
If yes, it would be extremely useful if we could use the same mechanism to pass -isystem to nvcc, to avoid all the warnings from system libraries.

Thanks, Carlos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160214/d6fb8bba/attachment.html>


More information about the CMake mailing list