Run multiple gbc jobs when using Bond.CSharp.targets

By default the Bond.CSharp.targets will run 2 fewer concurrent jobs than
there are processor cores on the machine. User can override this
behaviour for their project by specifying a different `--jobs` option in
`BondOptions` property.
This commit is contained in:
Adam Sapek 2015-02-12 11:36:08 -08:00
Родитель c764d993e0
Коммит f5ed61e2e9
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -69,7 +69,7 @@
<_BondExe Condition="'$(OS)' != 'Unix' Or Exists('$(BOND_COMPILER_PATH)\gbc.exe')">"$(BOND_COMPILER_PATH)\gbc.exe"</_BondExe>
<_BondExe Condition="'$(OS)' == 'Unix' And !Exists('$(BOND_COMPILER_PATH)\gbc.exe')">gbc</_BondExe>
<_BondImportDirs>--import-dir="$(BOND_INCLUDE_PATH)" @(BondImportDirectory -> '--import-dir=&quot;%(Identity)\.&quot;',' ')</_BondImportDirs>
<_BondCommand>$(_BondExe) $(BondCodegenMode) $(_BondImportDirs) --namespace=bond=Bond --output-dir="$(BondOutputDirectory)\."</_BondCommand>
<_BondCommand>$(_BondExe) $(BondCodegenMode) $(_BondImportDirs) --jobs=-2 --namespace=bond=Bond --output-dir="$(BondOutputDirectory)\."</_BondCommand>
</PropertyGroup>
<!-- We'll optimize to generate in a single command where possible -->

Просмотреть файл

@ -28,6 +28,11 @@ properties/items in your project:
$BondOptions : Additional options to pass to the gbc compiler for this project
$BondCodegenMode : Code generation mode for gbc to use (default c#)
By default gbc is executed with `--jobs=-2` option to compile multiple .bond
files concurrently, using 2 fewer jobs than there are processor cores. You can
override this behaviour by setting a different value for `--jobs` option via
the `BondOptions` property.
For details see http://microsoft.github.io/bond/manual/bond_cs.html#code-generation
ReSharper