Skip to content

Commit ca8f84b

Browse files
committed
Install Boost for Windows builds.
Boost was recently removed from Microsoft's hosted agents, so need to install it manually. Fixed Windows build.
1 parent 21b7e0b commit ca8f84b

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

Compile/src/Compiler.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
#pragma GCC diagnostic push
2929
#pragma GCC diagnostic ignored "-Wconversion"
3030
#pragma GCC diagnostic ignored "-Wsign-compare"
31+
#elif MSL_MSC
32+
#pragma warning(push)
33+
#pragma warning(disable: 4018)
3134
#endif
3235

3336
#include "SPIRV/GlslangToSpv.h"
@@ -37,6 +40,8 @@
3740

3841
#if MSL_GCC || MSL_CLANG
3942
#pragma GCC diagnostic pop
43+
#elif MSL_MSC
44+
#pragma warning(pop)
4045
#endif
4146

4247
namespace msl

azure-pipelines.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ trigger:
33
variables:
44
- name: cmake.commonArgs
55
value: -DCMAKE_FIND_ROOT_PATH=$(dependency.location) -DCMAKE_PREFIX_PATH=$(dependency.location)
6-
- name: boost.winVer
7-
value: $(BOOST_ROOT_1_72_0)
6+
- name: msvc.version
7+
value: 14.1
8+
- name: win.boostDir
9+
value: C:\hostedtoolcache\windows\Boost
810
- group: Common
911
jobs:
1012
- job: Linux
@@ -194,25 +196,35 @@ jobs:
194196
matrix:
195197
win32_static:
196198
arch: Win32
199+
bits: 32
197200
lib.type: Static
198-
cmake.args: -DMSL_SHARED=OFF -DBOOST_ROOT=$(boost.winVer)
201+
cmake.args: -DMSL_SHARED=OFF -DBOOST_ROOT=$(win.boostDir)
199202
win32_shared:
200203
arch: Win32
204+
bits: 32
201205
lib.type: Shared
202-
cmake.args: -DMSL_SHARED=ON -DBOOST_ROOT=$(boost.winVer)
206+
cmake.args: -DMSL_SHARED=ON -DBOOST_ROOT=$(win.boostDir)
203207
win64_static:
204208
arch: x64
209+
bits: 64
205210
lib.type: Static
206-
cmake.args: -DMSL_SHARED=OFF -DBOOST_ROOT=$(boost.winVer)
211+
cmake.args: -DMSL_SHARED=OFF -DBOOST_ROOT=$(win.boostDir)
207212
win64_shared:
208213
arch: x64
214+
bits: 64
209215
lib.type: Shared
210-
cmake.args: -DMSL_SHARED=ON -DBOOST_ROOT=$(boost.winVer)
216+
cmake.args: -DMSL_SHARED=ON -DBOOST_ROOT=$(win.boostDir)
211217
steps:
212218
- bash: |
213219
./update-submodules.sh
214220
displayName: Download submodules
215221
workingDirectory: $(Build.SourcesDirectory)
222+
- powershell: |
223+
$underscoreVersion = "$(boost.version)".replace(".", "_")
224+
$url = "https://sourceforge.net/projects/boost/files/boost-binaries/$(boost.version)/boost_$underscoreVersion-msvc-$(msvc.version)-$(bits).exe"
225+
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.exe")
226+
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=$(win.boostDir)"
227+
displayName: Download boost
216228
- bash: |
217229
git clone https://github.com/google/googletest.git googletest-code
218230
cd googletest-code
@@ -248,7 +260,7 @@ jobs:
248260
continueOnError: true
249261
timeoutInMinutes: 5
250262
env:
251-
PATH: $(PATH);$(boost.winVer)\lib
263+
PATH: $(PATH);$(win.boostDir)\lib$(bits)-msvc-$(msvc.version)
252264
- task: PublishTestResults@2
253265
inputs:
254266
testResultsFormat: JUnit
@@ -275,7 +287,7 @@ jobs:
275287
continueOnError: true
276288
timeoutInMinutes: 5
277289
env:
278-
PATH: $(PATH);$(boost.winVer)\lib
290+
PATH: $(PATH);$(win.boostDir)\lib$(bits)-msvc-$(msvc.version)
279291
- task: PublishTestResults@2
280292
inputs:
281293
testResultsFormat: JUnit

0 commit comments

Comments
 (0)