Skip to content

Commit

Permalink
- document ctest variables (#1018)
Browse files Browse the repository at this point in the history
Signed-off-by: SSE4 <tomskside@gmail.com>
  • Loading branch information
SSE4 authored and memsharded committed Jan 15, 2019
1 parent 31bb544 commit 4d9d4bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions reference/build_helpers/cmake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Parameters:
- **generator** (Optional, Defaulted to ``None``): Specify a custom generator instead of autodetect it. e.g., "MinGW Makefiles"
- **cmake_system_name** (Optional, Defaulted to ``True``): Specify a custom value for ``CMAKE_SYSTEM_NAME`` instead of autodetect it.
- **parallel** (Optional, Defaulted to ``True``): If ``True``, will append the `-jN` attribute for parallel building being N the :ref:`cpu_count()<cpu_count>`.
Also applies to parallel test execution (by defining ``CTEST_PARALLEL_LEVEL`` environment variable).
- **build_type** (Optional, Defaulted to ``None``): Force the build type instead of taking the value from the settings. Note this will
also make the ``CMAKE_BUILD_TYPE`` to be declared for multi configuration generators.
- **toolset** (Optional, Defaulted to ``None``): Specify a toolset for Visual Studio.
Expand Down Expand Up @@ -277,14 +278,15 @@ test()

.. code-block:: python
def test(args=None, build_dir=None, target=None)
def test(args=None, build_dir=None, target=None, output_on_failure=False)
Build `CMake` test target (could be RUN_TESTS in multi-config projects or ``test`` in single-config projects), which usually means building and running unit tests

Parameters:
- **args** (Optional, Defaulted to ``None``): A list of additional arguments to be passed to the ``cmake`` command. Each argument will be escaped according to the current shell. No extra arguments will be added if ``args=None``.
- **build_dir** (Optional, Defaulted to ``None``): CMake's output directory. If ``None`` is specified the ``build_folder`` from ``configure()`` will be used.
- **target** (Optional, default to ``None``). Alternative target name for running the tests. If not defined RUN_TESTS or ``test`` will be used
- **target** (Optional, default to ``None``). Alternative target name for running the tests. If not defined RUN_TESTS or ``test`` will be used.
- **output_on_failure** (Optional, default to ``False``). Enables ctest to show output of failed tests by defining ``CTEST_OUTPUT_ON_FAILURE`` environment variable (same effect as ``ctest --output-on-failure``).

install()
+++++++++
Expand Down

0 comments on commit 4d9d4bc

Please sign in to comment.