Skip to content

Commit

Permalink
Enable C++17 standard in AppVeyor tests
Browse files Browse the repository at this point in the history
To avoid increasing the build matrix we enable this unconditionally for
VS2019 and VS2022 to be able to test std::string_view. Note that we
already test VS2022 without this flag on GHA so this should catch any
regressions.
  • Loading branch information
zeux committed Oct 30, 2024
1 parent d5f14ad commit af6cbeb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/autotest-appveyor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ foreach ($vs in $args)

if (! $?) { throw "Error setting up VS$vs $arch" }

$cxx = if ($vs -ge 19) { "/std:c++17" } else { "" }

foreach ($defines in "standard", "PUGIXML_WCHAR_MODE", "PUGIXML_COMPACT")
{
$target = "tests_vs${vs}_${arch}_${defines}"
Expand All @@ -45,7 +47,7 @@ foreach ($vs in $args)
Add-AppveyorTest $target -Outcome Running

Write-Output "# Building $target.exe"
& cmd /c "cl.exe /MP /Fe$target.exe /EHsc /W4 /WX $deflist $sources 2>&1" | Tee-Object -Variable buildOutput
& cmd /c "cl.exe /MP /Fe$target.exe /EHsc /W4 /WX $cxx $deflist $sources 2>&1" | Tee-Object -Variable buildOutput

if ($?)
{
Expand Down

0 comments on commit af6cbeb

Please sign in to comment.