Compiles C/C++ sources using the Microsoft Visual C++ toolchain. The task provides access to the MSVC compiler (cl.exe). It can be used to compile C/C++ source files which can be later linked using the saker.msvc.clink() task. The task supports distributing its workload using build clusters.
|Architecture||Specifies the compilation target Architecture.|
|CompilerOptions||Specifies one or more option specifications that are merged with the inputs when applicable.|
|Identifier||The Identifier of the compilation.|
Required parameter.Specifies one or more inputs for the compilation.
|SDKs||Specifies the SDKs (Software Development Kits) used by the task.|
Specifies the compilation target Architecture. The compilation will target the specified architecture. If no architecture is specified, the one that the build is execution on will be used. If it cannot be determined, an exception is thrown and the Architecture option must be specified in that case. The used Architecture will be taken into account as a qualifier when merging CompilerOptions.
Specifies one or more option specifications that are merged with the inputs when applicable. The parameter can be used to indirectly specify various compilation arguments independent of the actual inputs. This is generally useful when common options need to be specified to multiple compilation inputs. When compilation arguments are determined, each option specification will be merged into the used argumnets if applicable. An option is considered to be applicable to merging if all of the Identifier parts are contained in the compilation task Identifier, and the Language and Architecture arguments can be matched. In case of unresolveable merge conflicts, the task will throw an appropriate exception. Output from the saker.msvc.coptions.preset() task can be passed as a value to this parameter.
The Identifier of the compilation. Each compilation task has an identifier that uniquely identifies it during a build execution. The identifier is used to determine the output directory of the compilation. It is also used to merge the appropriate options specified in CompilerOptions parameter. An identifier constists of dash separated parts of character sequences of a-z, A-Z, 0-9, _, ., (), , @. An option specification in the CompilerOptions can be merged if the compilation identifier contains all parts of the option Identifier. If not specified, the identifier is determined based on the current working directory, or assigned to "default", however, it won't be subject to option merging.
Required parameter.Specifies one or more inputs for the compilation. The inputs may be either simple paths, wildcards, file locations, file collections or complex configuration specifying the input source files passed to the backend compiler. If not specified, the compilation language will be determined based on the extension of an input 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.
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 "MSVC" SDK is used to determine the location of the backend executables (cl.exe, link.exe). If it is not specified, then the task will attempt to determine it automatically.