From 7263f3289e6e835c32fc7800d0c2d4e58bd21178 Mon Sep 17 00:00:00 2001 From: Roelf-Jilling Date: Thu, 15 Nov 2018 23:12:56 +0100 Subject: [PATCH] Fallback to the MSVC linker until vcpkg has been updated --- appveyor.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2db7e82..2f0f592 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,7 +32,6 @@ matrix: cache: - C:\cmake-3.8.0-win32-x86 - - C:\Tools\vcpkg install: - ps: | @@ -43,15 +42,6 @@ install: } $env:PATH="C:\cmake-3.8.0-win32-x86\bin;$env:PATH" } - # Until vcpkg has been updated. - # Note: vcpkg can also be removed from "cache". - if ($env:USE_TOOLSET -eq "LLVM" -and - (Get-Content C:\Tools\vcpkg\toolsrc\VERSION.txt).Replace('.','').Trim('"') -lt 20181020 - ) { - cd C:\Tools\vcpkg - git pull - cd "$env:APPVEYOR_BUILD_FOLDER" - } before_build: - ps: | @@ -67,8 +57,19 @@ before_build: } echo generator="$env:generator" if ($env:USE_TOOLSET -eq "LLVM") { + $LINKER = "lld-link" + # Workaround for lld bug with vcpkg integration + if ((Get-Content C:\Tools\vcpkg\toolsrc\VERSION.txt).Replace('.','').Trim('"') -lt 20181020) { + if ($env:PLATFORM -eq "x64") { + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" + } else { + call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat" + } + $LINKER = "link.exe" # MSVC-linker + } else { echo "==> vcpkg has been updated, please remove workaround from appvayor.yml." } + # /Workaround clang-cl --version - cmake .. -G "$env:generator" -T llvm -DGSL_CXX_STANDARD="$env:GSL_CXX_STANDARD" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_LINKER=lld-link + cmake .. -G "$env:generator" -T llvm -DGSL_CXX_STANDARD="$env:GSL_CXX_STANDARD" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_LINKER=$LINKER } else { cmake .. -G "$env:generator" -DGSL_CXX_STANDARD="$env:GSL_CXX_STANDARD"