Compilation Database
This json database can be generated by CompilationDB in the main config:
ExecutableConfig {
...
CompilationDB "$(ProjectDir)/cdb.json"
}
Without specifying a filename, it defaults to “compile_commands.json” in the working directory.
It is also possible with –compilation-db [<fn>] on the command line. The command line overrules Project.meta.
Example output:
[
{
"directory": "C:/test/sub",
"command": "g++ -c -MD -MF build/test_main_test/src/lib.d -o build/test_main_test/src/lib.o src/lib.cpp",
"file": "src/lib.cpp"
},
{
"directory": "C:/test/main",
"command": "g++ -c -MD -MF -D TEST build/test/src/main.d -o build/test/src/main.o src/main.cpp",
"file": "src/main.cpp"
}
]