new CompileCommand(directory, file, command, _arguments, output)
constructor
Parameters:
Name | Type | Description |
---|---|---|
directory |
string | build directory, i.e. working directory relative to the virtual root directory of a project |
file |
string | path relative to the virtual root directory of a project |
command |
string | command line; preprocessor include directives are relative to "directory" property |
_arguments |
Array.<string> | command line argument; preprocessor include directives are relative to "directory" property |
output |
string | output |
- Source:
Methods
(static) from(obj, root_directoryopt) → {CompileCommand}
Build a CompileCommand instance from an object that looks like a compile command
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
obj |
Object | an object | |
root_directory |
string |
<optional> |
root directory used to replace @ROOT@ in command and arguments |
- Source:
Returns:
an instance of CompileCommand
- Type
- CompileCommand
for_file_saving(root_directory) → {CompileCommand}
Convert compile command for file saving
Parameters:
Name | Type | Description |
---|---|---|
root_directory |
string | root directory |
- Source:
Returns:
a command command ready for saving in a file
- Type
- CompileCommand
is_for_c_compiler() → {boolean}
Test whether file is for a C compiler
- Source:
Returns:
the test result
- Type
- boolean
is_for_c_plus_plus_compiler() → {boolean}
Test whether file is for a C++ compiler
- Source:
Returns:
the test result
- Type
- boolean