Skip to content

Commit

Permalink
Add option to bootstrap.ps1 for build config.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Sep 24, 2023
1 parent 29eb8a7 commit 13ed5bc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bootstrap.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
param([switch]$Verbose)
param(
[switch]
$Verbose,
[ValidateSet("Debug", "RelWithDebInfo", "Release")]
[string]
$Config = "Release"
)

$root = $PSScriptRoot
if (!$root) {
Expand All @@ -23,7 +29,7 @@ if (! $installationPath) {
$opts = ""
$opts += " $root\build\mob.sln"
$opts += " -m"
$opts += " -p:Configuration=Release"
$opts += " -p:Configuration=${Config}"
$opts += " -noLogo"
$opts += " -p:UseMultiToolTask=true"
$opts += " -p:EnforceProcessCountAcrossBuilds=true"
Expand All @@ -45,5 +51,5 @@ if (! $?) {
exit $LastExitCode
}

Copy-Item "$root\build\src\Release\mob.exe" "$root\mob.exe"
Copy-Item "$root\build\src\${Config}\mob.exe" "$root\mob.exe"
Write-Output "run ``.\mob -d prefix/path build`` to start building"

0 comments on commit 13ed5bc

Please sign in to comment.