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:
Anton Sakhon
2023-03-21 02:40:08 +09:00
committed by GitHub
co-authored by Anton Sakhon
parent 1defa07ac9
commit 1d06f87d2d
2 changed files with 12 additions and 1 deletions
+11 -1
View File
@@ -394,8 +394,18 @@ class NativeBundle {
throwToolExit('Failed to cmake:\n$result');
}
final procResult = await Process.run('nproc', []);
final numProc = procResult.stdout.toString().trim();
result = await _processUtils.run(
<String>['cmake', '--build', '.'],
<String>[
'cmake',
'--build',
'.',
'--parallel',
numProc,
],
workingDirectory: outputDir.path,
);
if (result.exitCode != 0) {