Skip to content

Commit

Permalink
Build: Add -Clean to the build script parameters
Browse files Browse the repository at this point in the history
To clean all the output before starting build.
  • Loading branch information
shanepowell committed Aug 20, 2022
1 parent e048beb commit 4dbf792
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
Param
(
[ValidateSet("vs2019", "vs2022")][string]$Compiler = "vs2022",
[switch]$GenerateBuildFileOnly
[switch]$GenerateBuildFileOnly,
[switch]$Clean
)

$compilers = @{
"vs2019" = "Visual Studio 16 2019";
"vs2022" = "Visual Studio 17 2022";
}

if($Clean)
{
Remove-Item -Force -Recurse -ErrorAction SilentlyContinue x86
Remove-Item -Force -Recurse -ErrorAction SilentlyContinue x64
Remove-Item -Force -Recurse -ErrorAction SilentlyContinue build
}

Write-Host Generate build files
cmake -S . -B build/$($Compiler)x64 -G $compilers[$Compiler] -A x64
cmake -S . -B build/$($Compiler)x86 -G $compilers[$Compiler] -A win32
Expand Down

0 comments on commit 4dbf792

Please sign in to comment.