File: build-options.rst

package info (click to toggle)
xtl 0.7.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,320 kB
  • sloc: cpp: 19,730; makefile: 164; python: 25
file content (34 lines) | stat: -rw-r--r-- 1,126 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.. Copyright (c) 2017, Johan Mabille and Sylvain Corlay

   Distributed under the terms of the BSD 3-Clause License.

   The full license is in the file LICENSE, distributed with this software.

Build and configuration
=======================

Build
-----

``xtl`` build supports the following options:

- ``BUILD_TESTS``: enables the ``xtest`` target (see below).
- ``DOWNLOAD_GTEST``: downloads ``gtest`` and builds it locally instead of using a binary installation.
- ``GTEST_SRC_DIR``: indicates where to find the ``gtest`` sources instead of downloading them.
- ``XTL_DISABLE_EXCEPTIONS``: indicates that tests should be run with exceptions disabled.

All these options are disabled by default. Enabling ``DOWNLOAD_GTEST`` or setting ``GTEST_SRC_DIR``
enables ``BUILD_TESTS``.

If the ``BUILD_TESTS`` option is enabled, the following target is available:

- xtest: builds an run the test suite.

For instance, building the test suite of ``xtl`` where the sources of ``gtest`` are located in e.g. ``/usr/share/gtest``:

.. code::

    mkdir build
    cd build
    cmake -DGTEST_SRC_DIR=/usr/share/gtest ../
    make xtest