version: 1.4.{build}
os: Visual Studio 2015
platform: x64

environment:
  VCPKG_DEFAULT_TRIPLET: x64-windows
  GENERATOR: "Visual Studio 14 2015 Win64"

install:
- vcpkg install pmdk:x64-windows
- vcpkg install sfml:x64-windows
- vcpkg integrate install

cache: c:\tools\vcpkg\installed

configuration:
- Debug
- Release

matrix:
  fast_finish: true

before_build:
- cmake . -Bbuild -G "%GENERATOR%"
        -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
        -DCMAKE_INSTALL_PREFIX=c:/install/libpmemobj-cpp

build_script:
- msbuild build/ALL_BUILD.vcxproj /property:Configuration=%CONFIGURATION%

test_script:
- cd build
- ctest -C %CONFIGURATION% --output-on-failure
- msbuild INSTALL.vcxproj
- cd ..
# build standalone example
- cd examples/map_cli
- cmake . -G "%GENERATOR%"
        -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
        -DCMAKE_PREFIX_PATH=c:/install/libpmemobj-cpp
- msbuild ALL_BUILD.vcxproj
