@@ -4,7 +4,7 @@ branches:
44 only :
55 - master
66skip_non_tags : true
7- shallow_clone : true
7+ clone_depth : 10
88
99configuration : Release+ReleaseDLL
1010
@@ -13,7 +13,11 @@ platform: x86+x64
1313environment :
1414 matrix :
1515 - MSVC_VER : 12
16+ APPVEYOR_BUILD_WORKER_IMAGE : Visual Studio 2013
1617 - MSVC_VER : 14
18+ APPVEYOR_BUILD_WORKER_IMAGE : Visual Studio 2015
19+ - MSVC_VER : 15
20+ APPVEYOR_BUILD_WORKER_IMAGE : Visual Studio 2017
1721
1822install :
1923# Install GitLink
@@ -24,7 +28,7 @@ before_build:
2428- ps : >-
2529 $script = @'
2630
27- <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="GitLink" ToolsVersion="4 .0">
31+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="GitLink" ToolsVersion="APPVEYOR_MSVC_VER .0">
2832 <ItemGroup>
2933 <ConfigurationList Condition="'@(ConfigurationList)' == '' and $(Configuration) != ''" Include="$(Configuration.Split('+'))" />
3034 <ConfigurationList Condition="'@(ConfigurationList)' == ''" Include="Release" />
@@ -61,18 +65,36 @@ before_build:
6165
6266 $script = $script -replace "APPVEYOR_REPO_COMMIT", "$env:APPVEYOR_REPO_COMMIT"
6367
68+ $script = $script -replace "APPVEYOR_MSVC_VER", "$env:MSVC_VER"
69+
6470 $script | Out-File build.vcxproj
6571
6672# Backup platform so it is not affected by vcvars
6773- cmd : SET PLATFORMBACK=%PLATFORM%
6874
6975# Setup msvc environment for required compiler version (specified by MSVC_VER)
70- - ps : $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:MSVC_VER" + "0COMNTOOLS"))
71- - cmd : call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
76+ - ps : >-
77+ if ($env:MSVC_VER -eq 15) {
78+ $env:VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat"
79+ } else {
80+ $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:MSVC_VER" + "0COMNTOOLS"))
81+ $env:VCVARS="%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat"
82+ }
83+
84+ - cmd : call "%VCVARS%" amd64
7285
7386# Reset platform
7487- cmd : SET PLATFORM=%PLATFORMBACK%
7588
89+ # Set Targets path so that gitlink works correctly
90+ - ps : $env:MSBUILDDIR=((Get-Command msbuild.exe).Path | Split-Path -parent)
91+ - ps : >-
92+ if ($env:MSVC_VER -eq 15) {
93+ $env:VCTargetsPath="$env:MSBUILDDIR\..\..\..\Common7\IDE\VC\VCTargets"
94+ } else {
95+ $env:VCTargetsPath="$env:MSBUILDDIR\..\..\..\Microsoft.Cpp\v4.0\V${env:MSVC_VER}0"
96+ }
97+
7698build :
7799 project : build.vcxproj
78100 parallel : true
0 commit comments