tools/win32: Invalidate CMake cache on build

(cherry picked from commit fcfde9ac22)
This commit is contained in:
Markus Frosch 2018-12-18 11:52:06 +01:00 committed by Michael Friedrich
parent ea64467c65
commit 3b14c733ed
1 changed files with 5 additions and 0 deletions

View File

@ -53,6 +53,11 @@ 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 `
-G $env:CMAKE_GENERATOR -DCPACK_GENERATOR=WIX `