-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.ps1
20 lines (17 loc) · 680 Bytes
/
setup.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Cleanup any old Cmake artifacts
if( Test-Path -Path './build' ) {Remove-Item './build' -Recurse}
# Store the build type
$buildType=$args[0];
if( $buildType -eq $null ) {
Write-Output "Generating Makefile for DEBUG build"
New-Item -Path './build' -ItemType Directory
Set-Location './build'
cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE="../arm-gcc-toolchain.cmake" -DCMAKE_BUILD_TYPE=debug ..
}
else {
Write-Output "Generating Makefile for RELEASE build"
New-Item -Path './build' -ItemType Directory
Set-Location './build'
cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE="../arm-gcc-toolchain.cmake" -DCMAKE_BUILD_TYPE=release ..
}
exit 0