Skip to content
Snippets Groups Projects
Commit 1b19726b authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Exit returns correct exit code

parent f877bcd3
No related branches found
No related tags found
No related merge requests found
......@@ -41,12 +41,12 @@ mkdir -Force build_cpp
mkdir -Force $env:AIDGE_INSTALL_PATH
Set-Location build_cpp
cmake -DCMAKE_INSTALL_PREFIX:PATH=$env:AIDGE_INSTALL_PATH -DCMAKE_BUILD_TYPE=Debug ..
if(!$?) { Set-Location $PSScriptRoot; Exit $LASTEXITCODE }
if(!$?) { $lastError = $LASTEXITCODE; Set-Location $PSScriptRoot; Exit $lastError }
cmake --build . -j2
if(!$?) { Set-Location $PSScriptRoot; Exit $LASTEXITCODE }
if(!$?) { $lastError = $LASTEXITCODE; Set-Location $PSScriptRoot; Exit $lastError }
cmake --install . --config Debug
if(!$?) { Set-Location $PSScriptRoot; Exit $LASTEXITCODE }
if(!$?) { $lastError = $LASTEXITCODE; Set-Location $PSScriptRoot; Exit $lastError }
# Optional: run the unit tests
ctest --output-on-failure
if(!$?) { Set-Location $PSScriptRoot; Exit $LASTEXITCODE }
if(!$?) { $lastError = $LASTEXITCODE; Set-Location $PSScriptRoot; Exit $lastError }
Set-Location $PSScriptRoot
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment