CompileCommand

Hold an entry from the compilation database.

The following information is from the official specification. Standard

directory: The working directory of the compilation. All paths specified in the command or file fields must be either absolute or relative to this directory.

file: The main translation unit source processed by this compilation step. This is used by tools as the key into the compilation database. There can be multiple command objects for the same file, for example if the same source file is compiled with different configurations.

command: The compile command executed. After JSON unescaping, this must be a valid command to rerun the exact compilation step for the translation unit in the environment the build system uses. Parameters use shell quoting and shell escaping of quotes, with ‘"‘ and ‘\‘ being the only special characters. Shell expansion is not supported.

argumets: The compile command executed as list of strings. Either arguments or command is required.

output: The name of the output created by this compilation step. This field is optional. It can be used to distinguish different processing modes of the same input file.

Dextool additions. The standard do not specify how to treat "directory" when it is a relative path. The logic chosen in dextool is to treat it as relative to the path the compilation database file is read from.

Members

Structs

Command
struct Command

The raw command from the tuples "command" or "arguments value.

Variables

absoluteFile
AbsolutePath absoluteFile;

File that where compiled.

absoluteOutput
AbsolutePath absoluteOutput;

The resulting object file.

command
Command command;

The executing command when compiling.

directory
AbsolutePath directory;

Working directory of the command that compiled the input.

file
Path file;

File that where compiled.

output
Path output;

The resulting object file.

Meta