2017-04-02 15:24:42 -04:00
|
|
|
shallow_clone: true
|
|
|
|
|
|
|
|
platform:
|
|
|
|
- x86
|
|
|
|
- x64
|
|
|
|
|
|
|
|
configuration:
|
|
|
|
- Debug
|
|
|
|
- Release
|
|
|
|
|
|
|
|
image:
|
|
|
|
- Visual Studio 2015
|
|
|
|
- Visual Studio 2017
|
|
|
|
|
2018-06-15 13:13:11 -04:00
|
|
|
environment:
|
|
|
|
matrix:
|
2018-11-13 13:36:57 -05:00
|
|
|
#- GSL_CXX_STANDARD: 14
|
|
|
|
# USE_TOOLSET: MSVC
|
|
|
|
#- GSL_CXX_STANDARD: 17
|
|
|
|
# USE_TOOLSET: MSVC
|
2018-06-15 13:13:11 -04:00
|
|
|
- GSL_CXX_STANDARD: 14
|
2018-11-14 06:03:47 -05:00
|
|
|
USE_TOOLSET: LLVM
|
2018-06-15 13:13:11 -04:00
|
|
|
- GSL_CXX_STANDARD: 17
|
2018-11-14 06:03:47 -05:00
|
|
|
USE_TOOLSET: LLVM
|
2018-06-15 13:13:11 -04:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
exclude:
|
|
|
|
- image: Visual Studio 2015
|
|
|
|
GSL_CXX_STANDARD: 17
|
2018-11-13 13:17:55 -05:00
|
|
|
- image: Visual Studio 2015
|
2018-11-14 06:03:47 -05:00
|
|
|
USE_TOOLSET: LLVM
|
2018-06-15 13:13:11 -04:00
|
|
|
|
2017-04-02 15:24:42 -04:00
|
|
|
cache:
|
2017-07-13 16:53:56 -04:00
|
|
|
- C:\cmake-3.8.0-win32-x86
|
2017-04-02 15:24:42 -04:00
|
|
|
|
|
|
|
install:
|
|
|
|
- ps: |
|
2018-11-15 13:55:17 -05:00
|
|
|
if ($env:USE_TOOLSET -ne "LLVM") {
|
|
|
|
if (![IO.File]::Exists("C:\cmake-3.8.0-win32-x86\bin\cmake.exe")) {
|
|
|
|
Start-FileDownload 'https://cmake.org/files/v3.8/cmake-3.8.0-win32-x86.zip'
|
|
|
|
7z x -y cmake-3.8.0-win32-x86.zip -oC:\
|
|
|
|
}
|
|
|
|
$env:PATH="C:\cmake-3.8.0-win32-x86\bin;$env:PATH"
|
2017-04-02 15:24:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
before_build:
|
|
|
|
- ps: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
if ("$env:APPVEYOR_JOB_NAME" -match "Image: Visual Studio 2015") {
|
|
|
|
$env:generator="Visual Studio 14 2015"
|
|
|
|
} else {
|
|
|
|
$env:generator="Visual Studio 15 2017"
|
|
|
|
}
|
|
|
|
if ($env:PLATFORM -eq "x64") {
|
|
|
|
$env:generator="$env:generator Win64"
|
|
|
|
}
|
|
|
|
echo generator="$env:generator"
|
2018-11-15 13:47:18 -05:00
|
|
|
if ($env:USE_TOOLSET -eq "LLVM") {
|
2018-11-16 09:21:56 -05:00
|
|
|
$LINKER = "lld-link"
|
|
|
|
# Workaround for lld bug with vcpkg integration
|
|
|
|
if ((Get-Content C:\Tools\vcpkg\toolsrc\VERSION.txt).Replace('.','').Trim('"') -lt 20181020) {
|
2018-11-16 09:46:41 -05:00
|
|
|
echo "Fallback to MSVC linker."
|
|
|
|
cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% && PATH > path.txt'
|
2018-11-16 10:15:44 -05:00
|
|
|
$env:PATH = (Get-Content .\path.txt).Remove(0,5) # "PATH="
|
2018-11-16 09:46:41 -05:00
|
|
|
$LINKER = "link"
|
2018-11-16 09:21:56 -05:00
|
|
|
} else { echo "==> vcpkg has been updated, please remove the workaround from appvayor.yml." }
|
|
|
|
# /Workaround
|
2018-11-14 06:03:47 -05:00
|
|
|
clang-cl --version
|
2018-11-16 10:15:44 -05:00
|
|
|
cmake .. -G "$env:generator" -T llvm -DGSL_CXX_STANDARD="$env:GSL_CXX_STANDARD" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_LINKER=$LINKER
|
2018-11-13 13:17:55 -05:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
cmake .. -G "$env:generator" -DGSL_CXX_STANDARD="$env:GSL_CXX_STANDARD"
|
|
|
|
}
|
2017-04-02 15:24:42 -04:00
|
|
|
|
|
|
|
build_script:
|
|
|
|
- cmake --build . --config %CONFIGURATION% -- /m /v:minimal
|
|
|
|
|
|
|
|
test_script:
|
|
|
|
- ctest -j2
|
|
|
|
|
|
|
|
deploy: off
|