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

Aliases

FileName
alias FileName = dextool.type.FileName

The raw filename from the tuples "file" value.

Structs

AbsoluteDirectory
struct AbsoluteDirectory

The tuples "directory" value converted to the absolute path.

AbsoluteFileName
struct AbsoluteFileName

The combination of the tuples "file" and "directory" value.

Arguments
struct Arguments

The raw arguments from the tuples "arguments" value.

Command
struct Command

The raw command from the tuples "command" value.

Output
struct Output

The path to the output from running the command

Variables

absoluteFile
AbsoluteFileName absoluteFile;
absoluteOutput
AbsoluteFileName absoluteOutput;
arguments
Arguments arguments;
command
Command command;
directory
AbsoluteDirectory directory;
file
FileName file;
output
Output output;

Meta