Option presets are predefined configurations that can be applied to compiler and linker tasks. They are provided by the
saker.msvc.coptions.preset() task and they can be applied to the
CompilerOptions parameter for C compilation and
LinkerOptions parameter for linking.
An example that uses the preset for creating a dynamic link library:
$ccompile = saker.msvc.ccompile( src/**/*.cpp, CompilerOptions: [ saker.msvc.coptions.preset(dll), ] ) $procclink = saker.msvc.clink( $ccompile, LinkerOptions: [ saker.msvc.coptions.preset(dll), ] )
The preset with the name
dll can be used to get a preset configuration that when applied to the compilation and linker tasks will produce a DLL output.
The use of presets are optional, and the tasks may be configured the same way to the full extent without them.