Skip to content

Instantly share code, notes, and snippets.

@Trass3r
Last active February 20, 2018 17:15
Show Gist options
  • Select an option

  • Save Trass3r/292cf7779655de19aa16892029a61f58 to your computer and use it in GitHub Desktop.

Select an option

Save Trass3r/292cf7779655de19aa16892029a61f58 to your computer and use it in GitHub Desktop.
MSBuild specify parameters on the commandline
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<TreatWarningAsError>false</TreatWarningAsError>
<!-- otherwise in fallback mode you might end up with /Zi object files -->
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<OpenMPSupport>true</OpenMPSupport>
<!-- -fuse-ld=lld -->
<AdditionalOptions>-m64 /arch:AVX2 /fallback -Xclang --system-header-prefix=Q -mllvm -emit-codeview-ghash-section -Xclang -fopenmp -fcolor-diagnostics -Wno-reorder -Wno-missing-braces -Wno-unused-command-line-argument -Wignored-qualifiers -Werror=mismatched-new-delete</AdditionalOptions>
</ClCompile>
<Link>
<!-- can't produce msvc LTO format anyway -->
<LinkTimeCodeGeneration></LinkTimeCodeGeneration>
<AdditionalDependencies>C:\Program Files\LLVM\lib\libomp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<!-- in case of lld-link -->
<GenerateDebugInformation></GenerateDebugInformation>
<AdditionalOptions>/DEBUG:GHASH</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
</Project>
<!--
-Xclang -Rpass="loop|vect" -Xclang -Rpass-missed="loop|vect" -Xclang -Rpass-analysis="loop|vect"
-->
set LINK=
set CL=
msbuild Project.sln /m /nr:false /p:PlatformToolset=LLVM-vs2017 /p:ForceImportBeforeCppTargets=%~dp0\clangoptions.props /flp1:logfile=BuildLog.txt;Verbosity=normal /flp2:logfile=BuildWarnings.txt;warningsonly /p:Configuration=Release,Platform=x64 /t:Build
REM /t:"Solution Folders...\projectName"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment