Files
IfcOpenShell/docs/cpp-api/README.md
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.6 KiB
Markdown
Raw Normal View History

2023-09-29 11:35:10 +02:00
# IfcOpenShell C++ API documentation
2026-08-08 03:44:56 +02:00
This directory contains the Sphinx, Doxygen, Breathe, and Exhale configuration
for the IfcOpenShell C++ API reference. During a Sphinx build, Exhale runs
Doxygen, Breathe consumes the generated XML, and Exhale creates the API pages.
2023-09-29 11:35:10 +02:00
2026-08-08 03:44:56 +02:00
## Prerequisites
2023-09-29 11:35:10 +02:00
2026-08-08 03:44:56 +02:00
- Python 3.10 or newer
- [Doxygen](https://www.doxygen.nl/)
- [Graphviz](https://graphviz.org/)
2023-09-29 11:35:10 +02:00
2026-08-08 03:44:56 +02:00
Install the Python dependencies from this directory:
2023-09-29 11:35:10 +02:00
```shell
2026-08-08 03:44:56 +02:00
python -m pip install -r requirements.txt
2023-09-29 11:35:10 +02:00
```
2026-08-08 03:44:56 +02:00
Both `doxygen` and `dot` must be available on `PATH`. For the standard Windows
install locations, this can be done for the current PowerShell session with:
```powershell
$env:Path = "C:\Program Files\doxygen\bin;C:\Program Files\Graphviz\bin;$env:Path"
```
## Generating the documentation
From this directory, run:
2023-09-29 11:35:10 +02:00
```shell
2026-08-08 03:44:56 +02:00
python -m sphinx -M html . output -W --keep-going
2023-09-29 11:35:10 +02:00
```
2026-08-08 03:44:56 +02:00
To include the current Git commit in Doxygen's project metadata, set
`PROJECT_NUMBER` before building. For example, in PowerShell:
2023-09-29 11:35:10 +02:00
2026-08-08 03:44:56 +02:00
```powershell
$env:PROJECT_NUMBER = git rev-parse --short HEAD
python -m sphinx -M html . output -W --keep-going
```
2023-09-29 11:35:10 +02:00
2026-08-08 03:44:56 +02:00
Or in a POSIX shell:
2023-09-29 11:35:10 +02:00
```shell
2026-08-08 03:44:56 +02:00
PROJECT_NUMBER=$(git rev-parse --short HEAD) python -m sphinx -M html . output -W --keep-going
2023-09-29 11:35:10 +02:00
```
2026-08-08 03:44:56 +02:00
Alternatively, configure the main CMake project with
`-DBUILD_DOCUMENTATION=ON` and build the `cpp_api_docs` target.
The generated documentation is written to `output/html/index.html`. The
generated Doxygen XML and Exhale sources are kept under `output/` as build
artifacts.
The generated headers under `src/ifcparse/schemas` are intentionally excluded
from this documentation build.