Skip to content

Commit a6def3e

Browse files
authored
Fix number of processors environment variable Windows (#277)
1 parent 94b6714 commit a6def3e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ jobs:
212212
run: |
213213
echo "BUILD_TYPE=Release" >> $env:GITHUB_ENV
214214
echo "CODE_COVERAGE=0" >> $env:GITHUB_ENV
215-
echo "ncpus=%NUMBER_OF_PROCESSORS%"
216-
echo "ncpus=%NUMBER_OF_PROCESSORS%" >> $GITHUB_ENV
215+
$env:ncpus=$([Environment]::ProcessorCount)
216+
echo "ncpus=$env:ncpus" >> $env:GITHUB_ENV
217217
218218
- name: Setup compiler on Linux
219219
if: ${{ runner.os == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
@@ -671,8 +671,8 @@ jobs:
671671
run: |
672672
echo "BUILD_TYPE=Release" >> $env:GITHUB_ENV
673673
echo "CODE_COVERAGE=0" >> $env:GITHUB_ENV
674-
echo "ncpus=%NUMBER_OF_PROCESSORS%"
675-
echo "ncpus=%NUMBER_OF_PROCESSORS%" >> $GITHUB_ENV
674+
$env:ncpus=$([Environment]::ProcessorCount)
675+
echo "ncpus=$env:ncpus" >> $env:GITHUB_ENV
676676
677677
- name: Setup compiler on Linux
678678
if: runner.os == 'Linux'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ cmake --build . --target clang clang-repl --parallel $(nproc --all)
109109
```
110110
On Windows you would do this by executing the following
111111
```
112-
$env:ncpus = %NUMBER_OF_PROCESSORS%
112+
$env:ncpus = $([Environment]::ProcessorCount)
113113
mkdir build
114114
cd build
115115
cmake -DLLVM_ENABLE_PROJECTS=clang `

0 commit comments

Comments
 (0)