# Status available at
# https://ci.appveyor.com/project/fancycode/memorymodule
version: #{build}

os:
  - Visual Studio 2015

environment:
  matrix:
    - GENERATOR: "Visual Studio 10 2010"
      UNICODE: ON
    - GENERATOR: "Visual Studio 10 2010"
      UNICODE: OFF
    - GENERATOR: "Visual Studio 11 2012"
      UNICODE: ON
    - GENERATOR: "Visual Studio 11 2012"
      UNICODE: OFF
    - GENERATOR: "Visual Studio 12 2013"
      UNICODE: ON
    - GENERATOR: "Visual Studio 12 2013"
      UNICODE: OFF
    - GENERATOR: "Visual Studio 14 2015"
      UNICODE: ON
    - GENERATOR: "Visual Studio 14 2015"
      UNICODE: OFF

platform:
  - x86
  - x64

configuration:
  - Debug

build:
  verbosity: normal

build_script:
  - ps: if($env:PLATFORM -eq "x64") { $env:CMAKE_GEN_SUFFIX=" Win64" }
  - cmake "-G%GENERATOR%%CMAKE_GEN_SUFFIX%" -H. -Bbuild
  - cmake --build build --config %CONFIGURATION%

before_test:
  - copy /y build\example\DllLoader\%CONFIGURATION%\DllLoader.exe build\example\DllLoader\
  - copy /y build\example\DllLoader\%CONFIGURATION%\DllLoaderLoader.exe build\example\DllLoader\
  - copy /y build\example\SampleDLL\%CONFIGURATION%\SampleDLL.dll build\example\SampleDLL\

test_script:
  - cd build\example\DllLoader
  - DllLoader.exe
  - DllLoaderLoader.exe
