Use all cores during build (#171)
* Use all cores during build * Updated Authors --------- Co-authored-by: Anton Sakhon <[email protected]>
This commit is contained in:
co-authored by
Anton Sakhon
parent
1defa07ac9
commit
1d06f87d2d
@@ -9,3 +9,4 @@ Michael Lamers ([email protected])
|
|||||||
Andrea Daoud ([email protected])
|
Andrea Daoud ([email protected])
|
||||||
Taha Firoz ([email protected])
|
Taha Firoz ([email protected])
|
||||||
Weiwei Duan ([email protected])
|
Weiwei Duan ([email protected])
|
||||||
|
Anton Sakhon ([email protected])
|
||||||
|
|||||||
@@ -394,8 +394,18 @@ class NativeBundle {
|
|||||||
throwToolExit('Failed to cmake:\n$result');
|
throwToolExit('Failed to cmake:\n$result');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final procResult = await Process.run('nproc', []);
|
||||||
|
|
||||||
|
final numProc = procResult.stdout.toString().trim();
|
||||||
|
|
||||||
result = await _processUtils.run(
|
result = await _processUtils.run(
|
||||||
<String>['cmake', '--build', '.'],
|
<String>[
|
||||||
|
'cmake',
|
||||||
|
'--build',
|
||||||
|
'.',
|
||||||
|
'--parallel',
|
||||||
|
numProc,
|
||||||
|
],
|
||||||
workingDirectory: outputDir.path,
|
workingDirectory: outputDir.path,
|
||||||
);
|
);
|
||||||
if (result.exitCode != 0) {
|
if (result.exitCode != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user