Skip to content

Commit

Permalink
[build] Fixed PowerShell script to not fail on CMake warning.
Browse files Browse the repository at this point in the history
CMake complaints about CMake version 2.8.8 requirement of GTest.
Versions below 2.8.12 will soon become deprecated.

Co-authored-by: Maxim Sharabayko <maxsharabayko@haivision.com>
  • Loading branch information
ethouris and maxsharabayko committed Jan 18, 2021
1 parent 42a3bb7 commit c6591d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/build-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,20 @@ if ( $VS_VERSION -eq '2019' ) {
# fire cmake to build project files
$execVar = "cmake ../ -G`"$CMAKE_GENERATOR`" $cmakeFlags"
Write-Output $execVar

# Reset reaction to Continue for cmake as it sometimes tends to print
# things on stderr, which is understood by PowerShell as error. The
# exit code from cmake will be checked anyway.
$ErrorActionPreference = "Continue"
Invoke-Expression "& $execVar"

# check build ran OK, exit if cmake failed
if( $LASTEXITCODE -ne 0 ) {
return $LASTEXITCODE
}

$ErrorActionPreference = "Stop"

# run the set-version-metadata script to inject build numbers into appveyors console and the resulting DLL
. $PSScriptRoot/set-version-metadata.ps1

Expand Down

0 comments on commit c6591d5

Please sign in to comment.