msbuild: optional log and warning config

This commit is contained in:
bnnm 2021-08-13 22:35:14 +02:00
parent 4d85edd29e
commit a38ca51139
3 changed files with 22 additions and 1 deletions

1
.gitignore vendored
View File

@ -46,6 +46,7 @@ Release
/dependencies
/version_auto.h
/msvc-build.config.ps1
/msvc-build.log
/**/vgmstream-win.zip
/**/foo_input_vgmstream.fb2k-component

13
Directory.Build.props Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- MSBuild config: autoimported by MSBuild +15 (VS +2017) only, so it's probably better to use for small tweaks only -->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<DisableSpecificWarnings>4018;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View File

@ -19,6 +19,8 @@ if (!$toolset) { $toolset = "" }
if (!$sdk) { $sdk = "" }
# - platforms: "" (default), "Win32"
if (!$platform) { $platform = "" }
# print compilation log
#$log = 1
###############################################################################
$solution = "vgmstream_full.sln"
@ -126,7 +128,12 @@ function CallMsbuild
}
# main build (pass config separate and not as a single string)
& $msbuild $solution $config $platform $toolset $sdk $target /m
if (!$log) {
& $msbuild $solution $config $platform $toolset $sdk $target /m
}
else {
& $msbuild $solution $config $platform $toolset $sdk $target /m > "msvc-build.log"
}
}
function Build