forked from openigtlink/OpenIGTLink
-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor.yml
98 lines (87 loc) · 2.33 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: 1.0.{build}
os: Visual Studio 2015
#Google Test is not build correctly for v120 and v110, but the TestConfigure.h file is a workaround solution for the testing
environment:
matrix:
- Toolset: v140
- Toolset: v120
- Toolset: v110
platform:
- x86
- x64
- ARM
configuration:
- Debug
- Release
build:
verbosity: minimal
branches:
#whitelist
only:
- master
- Version3-Development
- VideoStreamMerge
clone_depth: 1
skip_tags: true
clone_folder: c:\projects\openigtlink
before_build:
- ps: |
Write-Output "Configuration: $env:CONFIGURATION"
Write-Output "Platform: $env:PLATFORM"
$generator = switch ($env:TOOLSET)
{
"v140" {"Visual Studio 14 2015"}
"v120" {"Visual Studio 12 2013"}
"v110" {"Visual Studio 11 2012"}
}
$generator = "$generator Win64"
build_script:
- ps: |
mkdir build -Force | Out-Null
cd build
& cmake -G "$generator" -DOpenIGTLink_PROTOCOL_VERSION_3=ON ..
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
& cmake --build . --config $env:CONFIGURATION
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
mkdir build -Force | Out-Null
cd ..
mkdir TestBuild
cd TestBuild
& cmake -G "$generator" -DCMAKE_PREFIX_PATH:PATH=..\build ..\Testing
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
& cmake --build . --config $env:CONFIGURATION
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
& ctest -C $env:CONFIGURATION --output-on-failure
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
cd ..\build
& cmake -G "$generator" -DOpenIGTLink_PROTOCOL_VERSION_3=OFF ..
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
& cmake --build . --config $env:CONFIGURATION
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
cd ..\TestBuild
& cmake -G "$generator" -DCMAKE_PREFIX_PATH:PATH=..\build ..\Testing
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
& cmake --build . --config $env:CONFIGURATION
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
& ctest -C $env:CONFIGURATION --output-on-failure
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}