diff options
author | Brad King <brad.king@kitware.com> | 2024-03-06 16:16:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-03-10 15:41:39 (GMT) |
commit | 5de1e21659090ca83e39e223d351e353347eb88e (patch) | |
tree | 1f618443c6abf98712619a5cb33a35c64439ab74 /Help/manual | |
parent | bbcbcff7d94bb3dd4b47ed5484207dc960911f4c (diff) | |
download | CMake-5de1e21659090ca83e39e223d351e353347eb88e.zip CMake-5de1e21659090ca83e39e223d351e353347eb88e.tar.gz CMake-5de1e21659090ca83e39e223d351e353347eb88e.tar.bz2 |
ctest: Allow passing -j without value to choose a contextual default
Under job server integration, added by commit 80fe56c481 (ctest: Add
support for running under a make job server on POSIX systems,
2023-11-15, v3.29.0-rc1~324^2), use a very high default so that
parallelism is effectively limited only by available job server tokens.
Otherwise, choose a default limit based on the number of processors.
Also allow passing `0` to specify unbounded parallelism.
Fixes: #25739
Diffstat (limited to 'Help/manual')
-rw-r--r-- | Help/manual/ctest.1.rst | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 602a82d..edbd5a4 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -118,17 +118,27 @@ Run Tests previously interrupted. If no interruption occurred, the ``-F`` option will have no effect. -.. option:: -j <jobs>, --parallel <jobs> +.. option:: -j [<level>], --parallel [<level>] - Run the tests in parallel using the given number of jobs. + Run tests in parallel, optionally limited to a given level of parallelism. - This option tells CTest to run the tests in parallel using given - number of jobs. This option can also be set by setting the - :envvar:`CTEST_PARALLEL_LEVEL` environment variable. + .. versionadded:: 3.29 - This option can be used with the :prop_test:`PROCESSORS` test property. + The ``<level>`` may be omitted, or ``0``, in which case: - See `Label and Subproject Summary`_. + * Under `Job Server Integration`_, parallelism is limited by + available job tokens. + + * Otherwise, if the value is omitted, parallelism is limited + by the number of processors, or 2, whichever is larger. + + * Otherwise, if the value is ``0``, parallelism is unbounded. + + This option may instead be specified by the :envvar:`CTEST_PARALLEL_LEVEL` + environment variable. + + This option can be used with the :prop_test:`PROCESSORS` test property. + See the `Label and Subproject Summary`_. .. option:: --resource-spec-file <file> |