Thanks David, I've managed to set this by:
Adding a Directory.build.props file to the root of my repo
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<AdditionalOptions>$(ClOptions) %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
</Project>
Passing through the ClOptions via MSBuild:
'$env:PreferredToolArchitecture="x64"; msbuild -m /p:RunCodeAnalysis=true /p:ClOptions="/analyze:log MyApp.nativecodeanalysis.combined.sarif" /p:CodeAnalysisRuleSet=NativeMinimumRules.ruleset /p:Configuration=Release /p:Platform=x86 /v:q MyApp.build.sln'
References: