Commit afecd15cf6de53b8a0d28061fd9ffaeac358b91f

Edward Thomson 2018-07-20T18:09:38

ci: msvc leak-checking

diff --git a/.vsts-ci.yml b/.vsts-ci.yml
index 6f43cce..57e56b7 100644
--- a/.vsts-ci.yml
+++ b/.vsts-ci.yml
@@ -85,7 +85,7 @@ phases:
   - powershell: . '$(Build.SourcesDirectory)\ci\build.ps1'
     displayName: Build
     env:
-      CMAKE_OPTIONS: -G"Visual Studio 12 2013 Win64"
+      CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013 Win64"
   - powershell: . '$(Build.SourcesDirectory)\ci\test.ps1'
     displayName: Test
 
@@ -97,7 +97,7 @@ phases:
   - powershell: . '$(Build.SourcesDirectory)\ci\build.ps1'
     displayName: Build
     env:
-      CMAKE_OPTIONS: -G"Visual Studio 12 2013"
+      CMAKE_OPTIONS: -DMSVC_CRTDBG=ON -G"Visual Studio 12 2013"
   - powershell: . '$(Build.SourcesDirectory)\ci\test.ps1'
     displayName: Test
 
diff --git a/ci/build.ps1 b/ci/build.ps1
index c5c7c87..159c1dd 100644
--- a/ci/build.ps1
+++ b/ci/build.ps1
@@ -11,15 +11,14 @@ Write-Host "Build directory:  ${BuildDirectory}"
 Write-Host ""
 Write-Host "Operating system version:"
 Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, ServicePackMajorVersion, BuildNumber, OSArchitecture | Format-List
-Write-Host "PATH:"
-Write-Host "${Env:PATH}"
+Write-Host "PATH: ${Env:PATH}"
 Write-Host ""
 
 Write-Host "##############################################################################"
 Write-Host "## Configuring build environment"
 Write-Host "##############################################################################"
 
-cmake $SourceDirectory -DBUILD_EXAMPLES=ON ${Env:CMAKE_OPTIONS}
+Invoke-Expression "cmake ${SourceDirectory} -DBUILD_EXAMPLES=ON ${Env:CMAKE_OPTIONS}"
 if ($LastExitCode -ne 0) { [Environment]::Exit($LastExitCode) }
 
 Write-Host ""