Merge pull request #6843 from Icinga/appveyor

Improve AppVeyor builds
This commit is contained in:
Michael Friedrich 2018-12-18 14:53:14 +01:00 committed by GitHub
commit 359cb14a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -11,6 +11,7 @@ environment:
BOOST_LIBRARYDIR: 'C:\Libraries\boost_1_65_1\lib64-msvc-14.1'
BISON_BINARY: 'C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_bison.exe'
FLEX_BINARY: 'C:\ProgramData\chocolatey\lib\winflexbison3\tools\win_flex.exe'
CMAKE_BUILD_TYPE: Debug
branches:
only:

View File

@ -2,6 +2,9 @@ if (-not (Test-Path env:ICINGA2_BUILDPATH)) {
$env:ICINGA2_BUILDPATH = '.\build'
}
if (-not (Test-Path env:CMAKE_BUILD_TYPE)) {
$env:CMAKE_BUILD_TYPE = 'RelWithDebInfo'
}
if (-not (Test-Path "$env:ICINGA2_BUILDPATH")) {
mkdir "$env:ICINGA2_BUILDPATH" | out-null
}
@ -53,8 +56,13 @@ cd "$env:ICINGA2_BUILDPATH"
#-DCMAKE_INSTALL_PREFIX="C:\Program Files\Icinga2" `
# Invalidate cache in case something in the build environment changed
if (Test-Path CMakeCache.txt) {
Remove-Item -Force CMakeCache.txt | Out-Null
}
& cmake.exe "$sourcePath" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_BUILD_TYPE="$env:CMAKE_BUILD_TYPE" `
-G $env:CMAKE_GENERATOR -DCPACK_GENERATOR=WIX `
-DICINGA2_WITH_MYSQL=OFF -DICINGA2_WITH_PGSQL=OFF `
-DOPENSSL_ROOT_DIR="$env:OPENSSL_ROOT_DIR" `