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:
Anton Sakhon
2023-03-20 19:40:08 +02:00
committed by GitHub
parent 1defa07ac9
commit 1d06f87d2d
2 changed files with 12 additions and 1 deletions
+1
View File
@@ -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)
+11 -1
View File
@@ -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) {