[CMake] CMake, CUDA and compilation database.
Urs
nab+cmake at lampshade.ch
Fri Oct 19 11:17:47 EDT 2018
Hi,
I'm trying to get CMake to output a compilation database for my project
using gcc and CUDA (nvcc). I'd use the compile_commands.json file for
rtags navigation in emacs and clang-tidy inspection.
To do that, I just added
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
to my CMakeLists.txt
But it looks like the output I get is only having the information for
the *.cpp files. It looks like the *.cu files are all compiled as
external objects taht have their own cmake code in subroutines and are
not built by the Makefile generator.
I'm not a cmake expert, is what I'm trying to do possible? Am I doing
something wrong somewhere?
Thanks,
Urs
More information about the CMake
mailing list