id = "cpp" name = "c++" description = "The system C++ compiler driver." executables = ["c++"] [commands] format = 1 label = "Compile C++" description = "Compile or link C++ sources. Only common options are offered; warnings, optimization levels and linker libraries are left out." quality = "ai-draft" base = "fig:c++" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/c++.ts" license = "MIT" [[commands.field]] id = "files" label = "Source files" type = "path" position = 0 multiple = true path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "output" label = "Output file" type = "path" option = ["-o"] path = { kind = "file", role = "output", must_exist = false } effect = "overwrite" sources = ["fig"] [[commands.field]] id = "std" label = "Language standard" type = "string" option = ["-std="] suggestions = [{ value = "c++11", label = "C++11" }, { value = "c++14", label = "C++14" }, { value = "c++17", label = "C++17" }, { value = "c++20", label = "C++20" }, { value = "c++2b", label = "C++23 (c++2b)" }] sources = ["fig"] [[commands.field]] id = "compile_only" label = "Compile only (no link)" type = "boolean" option = ["-c"] sources = ["fig"] [[commands.field]] id = "debug" label = "Debug info" type = "boolean" option = ["-g"] sources = ["fig"] [[commands.field]] id = "include_dirs" label = "Include directories" type = "path" option = ["-I"] multiple = true path = { kind = "directory", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "lib_dirs" label = "Library directories" type = "path" option = ["-L"] multiple = true path = { kind = "directory", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "defines" label = "Macro definitions" description = "NAME or NAME=value." type = "string" option = ["-D"] multiple = true sources = ["fig"] [[commands.field]] id = "pthread" label = "POSIX threads" type = "boolean" option = ["-pthread"] sources = ["fig"] [[commands.field]] id = "preprocess" label = "Preprocess only" type = "boolean" option = ["-E"] sources = ["fig"] [[commands.task]] id = "build" label = "Build an executable" fields = ["files", "output", "std"] required = ["files"] [[commands.task]] id = "object" label = "Compile to an object file" fields = ["files", "std", "compile_only"] required = ["files"] set = { compile_only = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["files", "output", "std", "compile_only", "debug"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["include_dirs", "lib_dirs", "defines", "pthread", "preprocess"]