Skip to content

Instantly share code, notes, and snippets.

@AnyOldName3
Last active January 17, 2024 17:48
Show Gist options
  • Save AnyOldName3/5e35690efa07c6e3daa783405358eed3 to your computer and use it in GitHub Desktop.
Save AnyOldName3/5e35690efa07c6e3daa783405358eed3 to your computer and use it in GitHub Desktop.
$buildDirs = "VulkanSceneGraph\build", "vsgXchange", "vsgImGui", "vsgExamples", "vsgTutorial"
$installDir = "${PSScriptRoot}\install"
$buildDirs | ForEach-Object {
Push-Location $_
try {
$branch = git branch --show-current
if ($branch -ne "master") {
Write-Warning "$_ is on branch $branch"
}
git pull --ff-only
if ($LASTEXITCODE -ne 0) {
throw "Exited with code $LASTEXITCODE"
}
git submodule update --init --recursive
if ($LASTEXITCODE -ne 0) {
throw "Exited with code $LASTEXITCODE"
}
cmake --build . --config Release
if ($LASTEXITCODE -ne 0) {
throw "Exited with code $LASTEXITCODE"
}
cmake --build . --config Debug
if ($LASTEXITCODE -ne 0) {
throw "Exited with code $LASTEXITCODE"
}
cmake --build . --config RelWithDebInfo
if ($LASTEXITCODE -ne 0) {
throw "Exited with code $LASTEXITCODE"
}
cmake --install . --config Release --prefix $installDir
if ($LASTEXITCODE -ne 0) {
throw "Exited with code $LASTEXITCODE"
}
cmake --install . --config Debug --prefix $installDir
if ($LASTEXITCODE -ne 0) {
throw "Exited with code $LASTEXITCODE"
}
cmake --install . --config RelWithDebInfo --prefix $installDir
if ($LASTEXITCODE -ne 0) {
throw "Exited with code $LASTEXITCODE"
}
}
finally {
Pop-Location
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment