Skip to content

Commit

Permalink
Azure Pipelines: use "clang-cl" for Windows builds
Browse files Browse the repository at this point in the history
Now that we can successfully compile with Clang, there's probably no reason to stick with MSVC.
  • Loading branch information
davidebeatrici committed Aug 16, 2020
1 parent 7edda54 commit a8fdc11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .ci/azure-pipelines-win-steps.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
parameters:
- name: architecture
type: string
- name: compilerPath
type: string
- name: vcpkgTriplet
type: string
- name: vcvarsPath
Expand All @@ -18,7 +20,7 @@ steps:
displayName: 'Prepare environment'
- script: |
call "${{parameters.vcvarsPath}}"
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{parameters.vcpkgTriplet}} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl $(Build.SourcesDirectory)
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{parameters.vcpkgTriplet}} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER="${{parameters.compilerPath}}" -DCMAKE_CXX_COMPILER="${{parameters.compilerPath}}" $(Build.SourcesDirectory)
cmake --build .
workingDirectory: $(Build.BinariesDirectory)
displayName: 'Build'
Expand Down
2 changes: 2 additions & 0 deletions .ci/azure-pipelines-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
- template: "azure-pipelines-win-steps.yml"
parameters:
architecture: "x86_64"
compilerPath: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/x64/bin/clang-cl.exe"
vcpkgTriplet: "x64-windows-static-md"
vcvarsPath: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
- job: windows_x86
Expand All @@ -17,5 +18,6 @@ jobs:
- template: "azure-pipelines-win-steps.yml"
parameters:
architecture: "x86"
compilerPath: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/bin/clang-cl.exe"
vcpkgTriplet: "x86-windows-static-md"
vcvarsPath: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvarsamd64_x86.bat"

0 comments on commit a8fdc11

Please sign in to comment.