|
| 1 | +# AppVeyor is very similar to travis, with some differences to comply with |
| 2 | +# MS Windows builds. See https://www.appveyor.com/docs/build-configuration/ |
| 3 | +# for the full documentation of the a build configuration script. See |
| 4 | +# https://www.appveyor.com/docs/appveyor-yml/ for a complete appveyor.yml |
| 5 | +# full syntax reference. |
| 6 | + |
1 | 7 | version: 1.0.{build}
|
2 | 8 |
|
3 | 9 | clone_folder: c:\dev\lib-template-cmake
|
4 | 10 |
|
5 |
| -os: |
6 |
| - - Visual Studio 2013 |
7 |
| - - Visual Studio 2015 |
8 |
| - - Visual Studio 2017 |
| 11 | +environment: |
| 12 | + matrix: |
| 13 | + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 |
| 14 | + CMAKE_GENERATOR: "Visual Studio 14 2015" |
| 15 | + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 |
| 16 | + CMAKE_GENERATOR: "Visual Studio 14 2015 Win64" |
| 17 | + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 |
| 18 | + CMAKE_GENERATOR: "Visual Studio 15 2017" |
| 19 | + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 |
| 20 | + CMAKE_GENERATOR: "Visual Studio 15 2017 Win64" |
| 21 | + |
| 22 | +init: |
| 23 | + # Print some more system information after installing all build tools |
| 24 | + - ps: echo "-------------------- BEGIN SYSTEM INFORMATION --------------------" |
| 25 | + - ps: echo $env:CMAKE_GENERATOR |
| 26 | + - ps: cmake --version |
| 27 | + - ps: echo "-------------------- END SYSTEM INFORMATION --------------------" |
9 | 28 |
|
10 | 29 | install:
|
11 | 30 |
|
12 | 31 | build:
|
13 | 32 |
|
14 | 33 | build_script:
|
15 | 34 | # Build the library
|
16 |
| - - cd c:\dev\lib-template-cmake |
17 |
| - - md build |
18 |
| - - cd build |
19 |
| - - cmake -DBUILD_TESTING:BOOL=ON -DCMAKE_CXX_FLAGS:STRING="/W4" .. |
| 35 | + - ps: cd c:\dev\lib-template-cmake |
| 36 | + - ps: md build |
| 37 | + - ps: cd build |
| 38 | + - ps: cmake -G"$env:CMAKE_GENERATOR" -DBUILD_TESTING:BOOL=ON -DCMAKE_CXX_FLAGS:STRING="/W4" .. |
20 | 39 |
|
21 | 40 | # Build the library for Release and Debug
|
22 |
| - - cmake --build . --config Debug |
23 |
| - - cmake --build . --config Release |
| 41 | + - ps: cmake --build . --config Debug |
| 42 | + - ps: cmake --build . --config Release |
24 | 43 |
|
25 | 44 | after_build:
|
26 | 45 | # Install only release
|
27 |
| - - cmake --build C:\dev\lib-template-cmake\build --config Release --target INSTALL |
| 46 | + - ps: cmake --build C:\dev\lib-template-cmake\build --config Release --target INSTALL |
28 | 47 |
|
29 | 48 | test_script:
|
30 |
| - - ctest -C Debug -VV |
31 |
| - - ctest -C Release -VV |
| 49 | + - ps: ctest -C Debug -VV |
| 50 | + - ps: ctest -C Release -VV |
0 commit comments