mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-25 01:01:58 -05:00
Workaround: try with full-path; and return user PATH
This commit is contained in:
parent
0f4fb04bac
commit
97062933ac
10
appveyor.yml
10
appveyor.yml
@ -18,8 +18,8 @@ environment:
|
||||
# USE_TOOLSET: MSVC
|
||||
#- GSL_CXX_STANDARD: 17
|
||||
# USE_TOOLSET: MSVC
|
||||
- GSL_CXX_STANDARD: 14
|
||||
USE_TOOLSET: LLVM
|
||||
#- GSL_CXX_STANDARD: 14
|
||||
# USE_TOOLSET: LLVM
|
||||
- GSL_CXX_STANDARD: 17
|
||||
USE_TOOLSET: LLVM
|
||||
|
||||
@ -57,17 +57,19 @@ before_build:
|
||||
}
|
||||
echo generator="$env:generator"
|
||||
if ($env:USE_TOOLSET -eq "LLVM") {
|
||||
$COMPILER = "C:\Program Files\LLVM\bin\clang-cl.exe"
|
||||
$LINKER = "lld-link"
|
||||
# Workaround for lld bug with vcpkg integration
|
||||
if ((Get-Content C:\Tools\vcpkg\toolsrc\VERSION.txt).Replace('.','').Trim('"') -lt 20181020) {
|
||||
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'
|
||||
$env:PATH = (Get-Content .\path.txt).Remove(0,5) # "PATH="
|
||||
$LINKER = "link"
|
||||
$LINKER = "link.exe"
|
||||
} else { echo "==> vcpkg has been updated, please remove the 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=$LINKER
|
||||
echo $env:PATH
|
||||
cmake .. -G "$env:generator" -T llvm -DGSL_CXX_STANDARD="$env:GSL_CXX_STANDARD" -DCMAKE_CXX_COMPILER="$COMPILER" -DCMAKE_LINKER="$LINKER"
|
||||
}
|
||||
else {
|
||||
cmake .. -G "$env:generator" -DGSL_CXX_STANDARD="$env:GSL_CXX_STANDARD"
|
||||
|
Loading…
Reference in New Issue
Block a user