mirror of https://github.com/procxx/kepka.git
				
				
				
			Send stderr from cmake into stdout
This will no more break build when warnings are received from cmake.
This commit is contained in:
		
							parent
							
								
									e49340e867
								
							
						
					
					
						commit
						bd54842997
					
				|  | @ -1,11 +1,21 @@ | |||
| $ErrorActionPreference = 'Stop' | ||||
| 
 | ||||
| Push-Location "$env:APPVEYOR_BUILD_FOLDER\build" | ||||
| 
 | ||||
| function execute-cmake { | ||||
|     # We have to merge the stderr and stdout here because otherwise the build will fail on any random warning | ||||
|     cmd /c 'cmake 2>&1' @args | ||||
|     if ($LASTEXITCODE -ne 0) { | ||||
|         throw "CMake execution error: $LASTEXITCODE" | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| try { | ||||
|     cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. | ||||
|     if (!$?) { throw 'Error running cmake' } | ||||
|     cmake --build . --config RelWithDebInfo | ||||
|     if (!$?) { throw 'Error building with cmake' } | ||||
|     execute-cmake '-GNinja' ` | ||||
|         '-DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake' ` | ||||
|         '-DCMAKE_BUILD_TYPE=RelWithDebInfo' ` | ||||
|         .. | ||||
|     execute-cmake --build . --config RelWithDebInfo | ||||
|     ctest . | ||||
|     if (!$?) { throw 'ctest execution error' } | ||||
| } finally { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue