Use all cores during build (#171)
* Use all cores during build * Updated Authors --------- Co-authored-by: Anton Sakhon <anton.sakhon@dataart.com>
This commit is contained in:
@@ -9,3 +9,4 @@ Michael Lamers (info@devmil.de)
|
|||||||
Andrea Daoud (andreadaoud6@gmail.com)
|
Andrea Daoud (andreadaoud6@gmail.com)
|
||||||
Taha Firoz (mtahafiroz@gmail.com)
|
Taha Firoz (mtahafiroz@gmail.com)
|
||||||
Weiwei Duan (duanweiwei1982@gmail.com)
|
Weiwei Duan (duanweiwei1982@gmail.com)
|
||||||
|
Anton Sakhon (kofhein@gmail.com)
|
||||||
|
|||||||
@@ -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