configuration:
  - Debug
  - Release

environment:
  matrix:
    - generator: "Visual Studio 14 2015"
    - generator: "Visual Studio 14 2015 Win64"
    - generator: "Visual Studio 10 2010"
    - generator: "Visual Studio 10 2010 Win64"
    - generator: "MinGW Makefiles"
      dialect: mingw
    - generator: "MinGW Makefiles"
      dialect: mingw-w64

matrix:
  fast_finish: true
  
shallow_clone: true

before_build:
  # Workaround for CMake not wanting sh.exe on PATH for MinGW
  - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
  - if "%dialect%"=="mingw" set PATH=c:\MinGW\bin;%PATH%
  - if "%dialect%"=="mingw-w64" set PATH=c:\msys64\mingw64\bin;%PATH%
  - cmake -Hsamples -Bbuild -G"%generator%" -DCMAKE_BUILD_TYPE=%configuration%

build_script:
  - if "%generator:~0,6%"=="Visual" set CMAKE_BUILD_FLAGS=--config %configuration% -- /m /v:m
  - if "%generator:~0,5%"=="MinGW" set CMAKE_BUILD_FLAGS=-- -j%NUMBER_OF_PROCESSORS%
  - cmake --build build %CMAKE_BUILD_FLAGS%
configuration:
  - Debug
  - Release

environment:
  matrix:
    - generator: "Visual Studio 14 2015"
    - generator: "Visual Studio 14 2015 Win64"
    - generator: "Visual Studio 10 2010"
    - generator: "Visual Studio 10 2010 Win64"
    - generator: "MinGW Makefiles"
      dialect: mingw
    - generator: "MinGW Makefiles"
      dialect: mingw-w64

matrix:
  fast_finish: true
  
shallow_clone: true

before_build:
  # Workaround for CMake not wanting sh.exe on PATH for MinGW
  - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
  - if "%dialect%"=="mingw" set PATH=c:\MinGW\bin;%PATH%
  - if "%dialect%"=="mingw-w64" set PATH=c:\msys64\mingw64\bin;%PATH%
  - cmake -Hsamples -Bbuild -G"%generator%" -DCMAKE_BUILD_TYPE=%configuration%

build_script:
  - if "%generator:~0,6%"=="Visual" set CMAKE_BUILD_FLAGS=--config %configuration% -- /m /v:m
  - if "%generator:~0,5%"=="MinGW" set CMAKE_BUILD_FLAGS=-- -j
  - cmake --build build %CMAKE_BUILD_FLAGS%
Change -j%NUMBER_OF_PROCESSORS% to -j (as it will use all cores by default).
Change -j%NUMBER_OF_PROCESSORS% to -j (as it will use all cores by default).
