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

new build jobs docs #2308

Merged
merged 2 commits into from
Dec 3, 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
11 changes: 4 additions & 7 deletions reference/conanfile/tools/cmake/cmake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ constructor

.. code:: python

def __init__(self, conanfile, parallel=True, namespace=None):
def __init__(self, conanfile, namespace=None):

- ``conanfile``: the current recipe object. Always use ``self``.
- ``parallel``: (Optional, Defaulted to True): If True, will append the -jN attribute (/m: in MSBuild) for parallel
building being N the value of the :ref:`tools.microsoft.msbuild:max_cpu_count<global_conf>`.
- ``namespace``: this argument avoids collisions when you have multiple toolchain calls in the same
recipe. By setting this argument the *conanbuild.conf* file used to pass some information to the
toolchain will be named as: *<namespace>_conanbuild.conf*. The default value is ``None`` meaning that
Expand Down Expand Up @@ -114,7 +112,7 @@ test()

.. code:: python

def test(self, build_type=None, target=None, output_on_failure=False):
def test(self, build_type=None, target=None):


Equivalent to running :command:`cmake --build . --target=RUN_TESTS`.
Expand All @@ -132,8 +130,7 @@ conf
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.build:jobs`` argument for the ``--jobs`` parameter when running Ninja generator.

- ``tools.microsoft.msbuild:max_cpu_count`` argument for the ``/m`` (``/maxCpuCount``) when running
``MSBuild`` (overrides the general ``tools.build:processes``).
``MSBuild``
3 changes: 1 addition & 2 deletions reference/conanfile/tools/meson.rst
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,4 @@ Runs project's tests. Equivalent to running :command:`meson test -v -C .` in the
conf
++++

- ``tools.ninja:jobs`` argument for the ``--jobs`` parameter when running Ninja. (overrides
the general ``tools.build:processes``).
- ``tools.build:jobs=10`` argument for the ``--jobs`` parameter when running Ninja.
80 changes: 47 additions & 33 deletions reference/config_files/global_conf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,44 +31,58 @@ 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.microsoft.msbuild:max_cpu_count=2
tools.microsoft.msbuild:vs_version = 16
tools.build:processes=10
tools.ninja:jobs=30
tools.gnu.make:jobs=40
tools.build:jobs=10


To list all possible configurations available, run :command:`conan config list`.

- core:required_conan_version: Raise if current version does not match the defined range.
- core.package_id:msvc_visual_incompatible: Allows opting-out the fallback from the new msvc compiler to the Visual Studio compiler existing binaries
- core:default_profile: Defines the default host profile ('default' by default)
- core:default_build_profile: Defines the default build profile (None by default)
- tools.android:ndk_path: Argument for the CMAKE_ANDROID_NDK
- tools.build:skip_test: Do not execute CMake.test() and Meson.test() when enabled
- tools.build:processes: Default jobs number
- tools.cmake.cmaketoolchain:generator: User defined CMake generator to use instead of default
- tools.cmake.cmaketoolchain:msvc_parallel_compile: Argument for the /MP when running msvc
- tools.cmake.cmaketoolchain:find_package_prefer_config: Argument for the CMAKE_FIND_PACKAGE_PREFER_CONFIG
- tools.cmake.cmaketoolchain:toolchain_file: Use other existing file rather than conan_toolchain.cmake one
- tools.cmake.cmaketoolchain:user_toolchain: Inject existing user toolchain at the beginning of conan_toolchain.cmake
- tools.cmake.cmaketoolchain:system_name: Define CMAKE_SYSTEM_NAME in CMakeToolchain
- tools.cmake.cmaketoolchain:system_version: Define CMAKE_SYSTEM_VERSION in CMakeToolchain
- tools.cmake.cmaketoolchain:system_processor: Define CMAKE_SYSTEM_PROCESSOR in CMakeToolchain
- tools.env.virtualenv:auto_use: Automatically activate virtualenv file generation
- tools.files.download:retry: Number of retries in case of failure when downloading
- tools.files.download:retry_wait: Seconds to wait between download attempts
- tools.gnu:make_program: Indicate path to make program
- tools.gnu.make:jobs: Argument for the -j parameter when running Make generator
- tools.google.bazel:config: Define Bazel config file
- tools.google.bazel:bazelrc_path: Defines Bazel rc-path
- tools.microsoft.msbuild:verbosity: Verbosity level for MSBuild: 'Quiet', 'Minimal', 'Normal', 'Detailed', 'Diagnostic'
- tools.microsoft.msbuild:max_cpu_count: Argument for the /m (/maxCpuCount) when running MSBuild
- tools.microsoft.msbuild:vs_version: Defines the IDE version when using the new msvc compiler
- tools.microsoft.msbuild:installation_path: VS install path, to avoid auto-detect via vswhere, like C:/Program Files (x86)/Microsoft Visual Studio/2019/Community
- tools.microsoft.msbuilddeps:exclude_code_analysis: Suppress MSBuild code analysis for patterns
- tools.microsoft.msbuildtoolchain:compile_options: Dictionary with MSBuild compiler options
- tools.ninja:jobs: Argument for the --jobs parameter when running Ninja generator
.. code-block:: bash

$ conan config list
Supported Conan *experimental* global.conf and [conf] properties:
core:required_conan_version: Raise if current version does not match the defined range.
core:non_interactive: Disable interactive user input, raises error if input necessary
core.package_id:msvc_visual_incompatible: Allows opting-out the fallback from the new msvc compiler to the Visual Studio compiler existing binaries
core:default_profile: Defines the default host profile ('default' by default)
core:default_build_profile: Defines the default build profile (None by default)
core.upload:retry: Number of retries in case of failure when uploading to Conan server
core.upload:retry_wait: Seconds to wait between upload attempts to Conan server
core.download:parallel: Number of concurrent threads to download packages
core.download:retry: Number of retries in case of failure when downloading from Conan server
core.download:retry_wait: Seconds to wait between download attempts from Conan server
core.net.http:max_retries: Maximum number of connection retries (requests library)
core.net.http:timeout: Number of seconds without response to timeout (requests library)
core.net.http:no_proxy_match: List of urls to skip from proxies configuration
core.net.http:proxies: Dictionary containing the proxy configuration
core.net.http:cacert_path: Path containing a custom Cacert file
core.net.http:client_cert: Path or tuple of files containing a client cert (and key)
core.net.http:clean_system_proxy: If defined, the proxies system env-vars will be discarded
core.gzip:compresslevel: The Gzip compresion level for Conan artifacts (default=9)
tools.android:ndk_path: Argument for the CMAKE_ANDROID_NDK
tools.build:skip_test: Do not execute CMake.test() and Meson.test() when enabled
tools.build:jobs: Default compile jobs number -jX Ninja, Make, /MP VS (default: max CPUs)
tools.cmake.cmaketoolchain:generator: User defined CMake generator to use instead of default
tools.cmake.cmaketoolchain:find_package_prefer_config: Argument for the CMAKE_FIND_PACKAGE_PREFER_CONFIG
tools.cmake.cmaketoolchain:toolchain_file: Use other existing file rather than conan_toolchain.cmake one
tools.cmake.cmaketoolchain:user_toolchain: Inject existing user toolchain at the beginning of conan_toolchain.cmake
tools.cmake.cmaketoolchain:system_name: Define CMAKE_SYSTEM_NAME in CMakeToolchain
tools.cmake.cmaketoolchain:system_version: Define CMAKE_SYSTEM_VERSION in CMakeToolchain
tools.cmake.cmaketoolchain:system_processor: Define CMAKE_SYSTEM_PROCESSOR in CMakeToolchain
tools.files.download:retry: Number of retries in case of failure when downloading
tools.files.download:retry_wait: Seconds to wait between download attempts
tools.gnu:make_program: Indicate path to make program
tools.google.bazel:config: Define Bazel config file
tools.google.bazel:bazelrc_path: Defines Bazel rc-path
tools.microsoft.msbuild:verbosity: Verbosity level for MSBuild: 'Quiet', 'Minimal', 'Normal', 'Detailed', 'Diagnostic'
tools.microsoft.msbuild:vs_version: Defines the IDE version when using the new msvc compiler
tools.microsoft.msbuild:max_cpu_count: Argument for the /m when running msvc to build parallel projects
tools.microsoft.msbuild:installation_path: VS install path, to avoid auto-detect via vswhere, like C:/Program Files (x86)/Microsoft Visual Studio/2019/Community
tools.microsoft.msbuilddeps:exclude_code_analysis: Suppress MSBuild code analysis for patterns
tools.microsoft.msbuildtoolchain:compile_options: Dictionary with MSBuild compiler options
tools.intel:installation_path: Defines the Intel oneAPI installation root path
tools.intel:setvars_args: Custom arguments to be passed onto the setvars.sh|bat script from Intel oneAPI


Configuration from build_requires
Expand Down
6 changes: 2 additions & 4 deletions reference/profiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,9 @@ Tools configurations can also be used in profile files and *global.conf* one. Pr

[conf]
tools.microsoft.msbuild:verbosity=Diagnostic
tools.microsoft.msbuild:max_cpu_count=20
tools.microsoft.msbuild:max_cpu_count=2
tools.microsoft.msbuild:vs_version = 16
tools.build:processes=10
tools.ninja:jobs=30
tools.gnu.make:jobs=40
tools.build:jobs=10

.. seealso::

Expand Down