saker.clang Documentation TaskDoc JavaDoc Packages
Options configuration to be used with saker.clang.compile(). The described options will be merged with the compilation input configuration based on the option qualifiers. The Identifier and Language fields are considered to be used as qualifiers for the option merging, in which case they are tested for mergeability with the input configuration.
Summary
Fields
ForceIncludeSpecifies the files that should be force included in the compiled source files.
IdentifierSpecifies the Identifier to which the options should be merged into.
IncludeDirectoriesSpecifies include directories that are used to resolve #include directives in the source code.
LanguageSpecifies the Language to which the options should be merged into.
MacroDefinitionsSpecifies key-value pairs which should be added as macro definitions for the compiled files.
PrecompiledHeaderSpecifies the path or file location of a header file that should be precompiled.
SDKsSpecifies the SDKs (Software Development Kits) used by the task.
SimpleCompilerParametersSpecifies one or more arguments that should be directly passed to clang.
Fields
Specifies the files that should be force included in the compiled source files. The option corresponds to the -include argument of clang. The option acts as if the specified file was included with the #include directive at the start of the compiled source file. Multiple force included files can be specified. You don't need to force include the precompiled header if you're using one.
Specifies the Identifier to which the options should be merged into. The associated options will only be merged into the target configuration if the target Identifier contains all parts as this Identifier. If no Identifier specified for this options, the Identifier is not considered as a qualifier.
Specifies include directories that are used to resolve #include directives in the source code. The values may be simple paths, wildcards, file locations, file collections, or SDK paths. The compilation task doesn't specify any include directories by default. Corresponds to the -I command line option for clang.
Specifies the Language to which the options should be merged into. The associated options will only be merged into the target configuration if the target Language is the same as the Language defined in this options. If no Language is specified for this options, the Language is not considered as a qualifier.
Specifies key-value pairs which should be added as macro definitions for the compiled files. Each entry in this map will be defined as a preprocessor macro definition for the compiled files. Corresponds to the -D <key>=<value> command line option for clang. If value is empty or null, it will be omitted, and -D <key> is used. When merging, the macro definitions won't overwrite macro definitions specified previously.
Specifies the path or file location of a header file that should be precompiled. Precompiled headers files can be preprocessed by the compiler and included in multiple source files. Using them can result in faster builds as the compiler can reuse the result of the precompilation. It is recommended that the precompiled headers contains infrequently changing source files. The precompiled header will be automatically force included in the compiled source files. When merging, only a single precompiled header may be used. An exception is thrown in case of conflict.
Specifies the SDKs (Software Development Kits) used by the task. SDKs represent development kits that are available in the build environment and to the task. SDKs are used to determine the appropriate build environment to execute the task, as well to resolve paths against them (e.g. IncludeDirectory, LibraryPath). The "Clang" SDK is used to determine the location of the clang executable. If it is not specified, then the task will attempt to determine it automatically. When merging, duplicate SDK definitions are not overwritten.
Specifies one or more arguments that should be directly passed to clang. Any arguments specified will be appended to the clang invocation for the inputs. Take care when using this option as specifying files here may result in incorrect incremental builds. The order of the specified arguments are kept. When merging, duplicate parameters are removed automatically.