saker.msvc Documentation TaskDoc JavaDoc

Include directories

The IncludeDirectories property for the saker.msvc.ccompile() task can be used to specify include paths where the compiler will search for #included files:

saker.msvc.ccompile(
	{
		Files: src/**/*.cpp,
		IncludeDirectories: include
	}
)

The above simply adds the include subdirectory of the current working directory to the current include search path. The specified directories are passed to the compiler using the /I parameter.

You can also add SDK paths as include directories. You may need to add the include directory of the MSVC toolchain if you don't use any option presets:

saker.msvc.ccompile(
	{
		Files: src/**/*.cpp,
		IncludeDirectories: [
			sdk.path(MSVC, Identifier: include)
		]
	}
)

The associated SDK with the name MSVC is implicitly added by the task implementation.