I know in the past setting all of NVidia's headers to be system includes would actually break compilation of complex projects such as Thrust.
The reason for this was that in the past you would get the following error: "error: kernel launches from templates are not allowed in system files" On Mon, Mar 30, 2015 at 10:05 AM, Brad King <[email protected]> wrote: > On 03/28/2015 09:34 PM, Michael Tanner wrote: > > using the CMAKE_INCLUDE_SYSTEM_FLAG_C flag to treat NVIDIA's > > include files as system headers. > > Good idea. > > > - set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} > "-I${CUDA_INCLUDE_DIRS}") > > + string(STRIP ${CMAKE_INCLUDE_SYSTEM_FLAG_C} > CMAKE_INCLUDE_SYSTEM_FLAG_C_STRIPPED) > > + set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} > ${CMAKE_INCLUDE_SYSTEM_FLAG_C_STRIPPED} ${CUDA_INCLUDE_DIRS}) > > I don't think CMAKE_INCLUDE_SYSTEM_FLAG_C is the proper flag: > > - It may not be set if C is not enabled > - It may not be set if the current compiler has no such flag > - It specifies a flag for the current "real" compiler, not for nvcc > > Does nvcc support -isystem on all platforms such that we could > just hard-code using the flag? > > Thanks, > -Brad > >
-- 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-developers
