saker.msvc Documentation TaskDoc JavaDoc Packages
Input configuration for the saker.msvc.ccompile() task. The configuration specifies which files should be compiled, in what manner. The Files field defines the inputs to the compilation task. The target architecture is determined by the direct Architecture parameter of the compiler task.
Summary
Fields
CompilerOptionsSpecifies one or more option specifications that are merged with the configuration when applicable.
FilesSpecifies the files that should be compiled.
ForceIncludeSpecifies the files that should be force included in the compiled source files.
ForceIncludePrecompiledHeaderBoolean that specifies if the precompiled header should be force included in the source files.
ForceUsingSpecifies the files that should be force used in the compiled source files.
IncludeDirectoriesSpecifies include directories that are used to resolve #include directives in the source code.
LanguageSpecifies the programming language that should be used for the compilation of the specified files.
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.
SimpleParametersSpecifies one or more arguments that should be directly passed to the compiler backend (cl.exe).
SubIdentifierSpecifies the sub-identifier that should be used as a qualifier when merging CompilerOptions.
Fields
Specifies one or more option specifications that are merged with the configuration when applicable. Similar to the CompilerOption parameter in saker.msvc.ccompile(), but only affects this input configuration. Mergeability is determined the same way, but with the SubIdentifier field appended to the task compilation identifier. Output from the saker.msvc.coptions.preset() task can be passed as a value to this field.
Specifies the files that should be compiled. Accepts simple paths, wildcards, file locations, and file collections. The specified files are directly passed to the backend compiler (cl.exe).
Specifies the files that should be force included in the compiled source files. The option corresponds to the /FI argument of cl.exe. 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. To force include the precompiled header file, use the ForceIncludePrecompiledHeader option set to true.
Boolean that specifies if the precompiled header should be force included in the source files. If you're using precompiled headers, you will need to include them at the first line of your source files. Setting this option to true will cause the compiler to include it for you, so you don't need to start your source files with the #include precompiled header directive. (In general we don't recommend using this option as that could cause portability issues of your source code.)
Specifies the files that should be force used in the compiled source files. The option corresponds to the /FU argument of cl.exe. The option acts as if the specified file was included with the #using directive at the start of the compiled source file. Multiple force used files can be specified.
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 cl.exe.
Specifies the programming language that should be used for the compilation of the specified files. If not specified, the language will be determined based on the extension of each file. If the file extension ends with "pp" or "xx", C++ is used by default. In any other cases, the file is compiled for the C language. The language is also used to determine if the given CompilerOptions configuration should be merged. The languages are treated in an case-insensitive way. Corresponds to the /Tc or /Tp command line options accordingly for cl.exe.
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 cl.exe. If value is empty or null, it will be omitted, and -D <key> is used.
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 should be included in the compiled source files in the first line. They can be included with the #include "header_file_name.h" directive. (Substitute the header_file_name.h with the actual simple file name of the header.)
Specifies one or more arguments that should be directly passed to the compiler backend (cl.exe). Any arguments specified will be appended to the cl.exe 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.
Specifies the sub-identifier that should be used as a qualifier when merging CompilerOptions. The sub-identifier specified here will be merged with the Identifier of the compiler task, and the mergeability of a compiler option configuration is determined based on the merged identifier.