Skip to content

Commit

Permalink
Add support for 1 core machines
Browse files Browse the repository at this point in the history
  • Loading branch information
mortinger91 committed Oct 20, 2023
1 parent 754908d commit 7c2db00
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion ProjectFolder/scripts/build_debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ elif [ "$(uname -s)" == "Darwin" ]; then
else
exit 1
fi
cpu_count=$((cpu_count - 1))

echo "Bulding Debug version using ${cpu_count} threads..."
cmake --build build/Debug/ -j$cpu_count
Expand Down
1 change: 0 additions & 1 deletion ProjectFolder/scripts/create_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ elif [ "$(uname -s)" == "Darwin" ]; then
else
exit 1
fi
cpu_count=$((cpu_count - 1))

echo "Bulding Release version using ${cpu_count} threads..."
cmake --build build/Release/ -j$cpu_count
Expand Down
1 change: 0 additions & 1 deletion ProjectFolder/scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ elif [ "$(uname -s)" == "Darwin" ]; then
else
exit 1
fi
cpu_count=$((cpu_count - 1))

echo "Running tests using ${cpu_count} threads..."
ctest --output-on-failure --test-dir build/$BUILD_TYPE/tests -j$cpu_count
Expand Down
3 changes: 1 addition & 2 deletions ProjectFolder/scripts/windows/build_debug.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@

try {
$cpu_count = (Get-WmiObject -Class Win32_ComputerSystem).NumberOfLogicalProcessors
$cpu_count = $cpu_count - 1
}
catch {
$cpu_count = 4
$cpu_count = 1
}

Write-Host "Building Debug version using $($cpu_count) threads..."
Expand Down
3 changes: 1 addition & 2 deletions ProjectFolder/scripts/windows/create_release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ Write-Host "Finished building Release CMake files!"

try {
$cpu_count = (Get-WmiObject -Class Win32_ComputerSystem).NumberOfLogicalProcessors
$cpu_count = $cpu_count - 1
}
catch {
$cpu_count = 4
$cpu_count = 1
}

Write-Host "Building Release version using $cpu_count threads..."
Expand Down
3 changes: 1 addition & 2 deletions ProjectFolder/scripts/windows/run_tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ Write-Host "Picked build type: $BUILD_TYPE for tests"

try {
$cpu_count = (Get-WmiObject -Class Win32_ComputerSystem).NumberOfLogicalProcessors
$cpu_count = $cpu_count - 1
}
catch {
$cpu_count = 4
$cpu_count = 1
}

Write-Host "Running tests using $cpu_count threads..."
Expand Down

0 comments on commit 7c2db00

Please sign in to comment.