Update build-repo.ps1

This commit is contained in:
Markus Fleschutz 2022-01-21 12:19:51 +01:00
parent f7722366ec
commit a15e596ce4

View File

@ -18,11 +18,11 @@ param([string]$RepoDir = "$PWD")
function MakeDir { param($Path) function MakeDir { param($Path)
$DirName = (get-item "$Path").Name $DirName = (get-item "$Path").Name
if (test-path "$Path/CMakeLists.txt" -pathType leaf) { if (test-path "$Path/CMakeLists.txt" -pathType leaf) {
"🔨 Building 📂$DirName using CMakeLists.txt to subfolder BuildFiles..." "🔨 Building 📂$DirName using CMakeLists.txt to subfolder _MyBuild/..."
if (-not(test-path "$Path/BuildFiles/" -pathType container)) { if (-not(test-path "$Path/_MyBuild/" -pathType container)) {
& mkdir "$Path/BuildFiles/" & mkdir "$Path/_MyBuild/"
} }
set-location "$Path/BuildFiles/" set-location "$Path/_MyBuild/"
& cmake .. & cmake ..
if ($lastExitCode -ne "0") { throw "Executing 'cmake ..' has failed" } if ($lastExitCode -ne "0") { throw "Executing 'cmake ..' has failed" }