Skip to content

Commit 1d06f87

Browse files
KofheinAnton Sakhon
and
Anton Sakhon
authored
Use all cores during build (#171)
* Use all cores during build * Updated Authors --------- Co-authored-by: Anton Sakhon <anton.sakhon@dataart.com>
1 parent 1defa07 commit 1d06f87

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Michael Lamers (info@devmil.de)
99
Andrea Daoud (andreadaoud6@gmail.com)
1010
Taha Firoz (mtahafiroz@gmail.com)
1111
Weiwei Duan (duanweiwei1982@gmail.com)
12+
Anton Sakhon (kofhein@gmail.com)

lib/elinux_build_target.dart

+11-1
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,18 @@ class NativeBundle {
394394
throwToolExit('Failed to cmake:\n$result');
395395
}
396396

397+
final procResult = await Process.run('nproc', []);
398+
399+
final numProc = procResult.stdout.toString().trim();
400+
397401
result = await _processUtils.run(
398-
<String>['cmake', '--build', '.'],
402+
<String>[
403+
'cmake',
404+
'--build',
405+
'.',
406+
'--parallel',
407+
numProc,
408+
],
399409
workingDirectory: outputDir.path,
400410
);
401411
if (result.exitCode != 0) {

0 commit comments

Comments
 (0)