compiledb
compiledb copied to clipboard
support for nvcc
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"
}
]
It seems all targets for filetype .cu
is ignored. I use clang++ to for compiling cuda files, but it is ignored too.