Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for more fine-grained control (using [conf]) for build parallelization #2061

Merged
merged 2 commits into from Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions reference/conanfile/tools/cmake.rst
Expand Up @@ -317,3 +317,9 @@ conf
- ``tools.microsoft.msbuild:verbosity`` will accept one of ``"Quiet", "Minimal", "Normal", "Detailed", "Diagnostic"`` to be passed
to the ``CMake.build()`` command, when a Visual Studio generator (MSBuild build system) is being used for CMake. It is passed as
an argument to the underlying build system via the call ``cmake --build . --config Release -- /verbosity:Diagnostic``

- ``tools.ninja:jobs`` argument for the ``--jobs`` parameter when running Ninja generator. (overrides
the general ``tools.build:processes``).

- ``tools.microsoft.msbuild:max_cpu_count`` argument for the ``/m`` (``/maxCpuCount``) when running
``MSBuild`` (overrides the general ``tools.build:processes``).
5 changes: 5 additions & 0 deletions reference/conanfile/tools/gnu.rst
Expand Up @@ -156,6 +156,11 @@ consistent conventions and strategy, however they are currently completely
independent from each other. Thus, you can use this toolchain without using the
``MakeGenerator``.

conf
++++

- ``tools.gnu.make:jobs``: argument for the ``--jobs`` parameter when running ``make``
(overrides the general ``tools.build:processes``).

Using the toolchain in developer flow
+++++++++++++++++++++++++++++++++++++
Expand Down
6 changes: 6 additions & 0 deletions reference/conanfile/tools/meson.rst
Expand Up @@ -187,3 +187,9 @@ test()
def test(self):

Runs project's tests. Equivalent to running :command:`meson test -v -C .` in the build folder..

conf
++++

- ``tools.ninja:jobs`` argument for the ``--jobs`` parameter when running Ninja. (overrides
the general ``tools.build:processes``).
21 changes: 18 additions & 3 deletions reference/config_files/global_conf.rst
Expand Up @@ -31,10 +31,25 @@ have priority over globally defined ones in *global.conf*, and can be defined as

[conf]
tools.microsoft.msbuild:verbosity=Diagnostic

tools.microsoft.msbuild:max_cpu_count=20
tools.build:processes=10
tools.ninja:jobs=30
tools.gnu.make:jobs=40

Existing configurations:

- ``tools.microsoft.msbuild:verbosity`` allows defining a value from ``"Quiet", "Minimal", "Normal", "Detailed", "Diagnostic"`` for build using the
MSBuild system, it could be with the ``tools.microsoft.MSBuild`` or with the ``tools.cmake.CMake`` helpers.
- ``tools.microsoft.msbuild:verbosity`` allows defining a value from ``"Quiet", "Minimal", "Normal",
"Detailed", "Diagnostic"`` for build using the
MSBuild system, it could be with the ``tools.microsoft.MSBuild`` or with the ``tools.cmake.CMake``
helpers.

- ``tools.microsoft.msbuild:max_cpu_count`` argument for the ``/m`` (``/maxCpuCount``) when running
``MSBuild`` standalone or via CMake (overrides the general ``tools.build:processes``).

- ``tools.build:processes``: number of processes to use for every build-helper.

- ``tools.ninja:jobs`` argument for the ``--jobs`` parameter when running Ninja generator via CMake
or Meson. (overrides the general ``tools.build:processes``).

- ``tools.gnu.make:jobs``: argument for the ``--jobs`` parameter when running ``make``
(overrides the general ``tools.build:processes``).