compiledb icon indicating copy to clipboard operation
compiledb copied to clipboard

support for nvcc

Open akshit-sharma opened this issue 2 years ago • 1 comments

Support for converting cuda from Makefile to compile_commands.json.

Sample Makefile

CXX=g++
all: helloworld hello
helloworld: helloworld.cpp
      $(CXX) -o helloworld helloworld.cpp --std=c++17 -DMAKE
hello: hello.cu
      nvcc -o hello hello.cu -DCUMAKE
clean:
      rm -f hello helloworld

current compile_commands.json creation

[
 {
  "directory": "/home/akshit/Projects/CppVariations/makefile",
  "arguments": [
   "g++",
   "-o",
   "helloworld",
   "helloworld.cpp",
   "--std=c++17",
   "-DMAKE"
  ],
  "file": "helloworld.cpp"
 }
]

akshit-sharma avatar Oct 22 '21 19:10 akshit-sharma

It seems all targets for filetype .cu is ignored. I use clang++ to for compiling cuda files, but it is ignored too.

explocion avatar May 23 '22 20:05 explocion