Skip to content

Commit

Permalink
Add a separate build with Windows.h included
Browse files Browse the repository at this point in the history
  • Loading branch information
nickaein committed May 22, 2019
1 parent 004ae1b commit 7bdcf89
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ environment:
LINKER_FLAGS: ""
GENERATOR: Visual Studio 14 2015

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
platform: x86
name: with_win_header
CXX_FLAGS: ""
LINKER_FLAGS: ""
GENERATOR: Visual Studio 14 2015

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform: x86
CXX_FLAGS: ""
Expand Down Expand Up @@ -81,6 +88,9 @@ install:
- if "%COMPILER%"=="mingw" g++ --version

before_build:
# for with_win_header build, inject the inclusion of Windows.h to the single-header library
- ps: if ($env:name -Eq "with_win_header") { $header_path = "single_include\nlohmann\json.hpp" }
- ps: if ($env:name -Eq "with_win_header") { "#include <Windows.h>`n" + (Get-Content $header_path | Out-String) | Set-Content $header_path }
- cmake . -G "%GENERATOR%" -DCMAKE_BUILD_TYPE="%configuration%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LINKER_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin"

build_script:
Expand Down

0 comments on commit 7bdcf89

Please sign in to comment.