From 9f0a781d05acee5b6e01ec26ab94664533f4fec0 Mon Sep 17 00:00:00 2001 From: Dirk Olbrich Date: Fri, 29 Sep 2023 11:35:10 +0200 Subject: [PATCH] docs: add README with instructions --- docs/cpp-api/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docs/cpp-api/README.md diff --git a/docs/cpp-api/README.md b/docs/cpp-api/README.md new file mode 100644 index 0000000000..fce37e5f84 --- /dev/null +++ b/docs/cpp-api/README.md @@ -0,0 +1,29 @@ +# IfcOpenShell C++ API documentation + +This folder contains the setup to build the IfcOpenShell C++ API documentation from the source code. + +## Generating the documentation + +Prerequisites: make sure to have [Doxygen](https://www.doxygen.nl) and [Graphviz](https://graphviz.org) installed into your `$PATH` variable. + +Build with the command (from within the `/docs/cpp-api` folder): + +```shell +$ doxygen +``` + +To include the current git commit hash into the build documentation, use the following command: + +```shell +$ PROJECT_NUMBER=$(git rev-parse --short HEAD) doxygen +``` + +This will extract the current commit hash in short version and sets the propper ENV variable used by doxygen. + +The generation of the documentation might take a while depending on your systems hardware, as it is configured to generate the Class graphs using . + +The resulting documentation is located unter `/cpp-api/output/html` and can be directly accessed with your browser: + +```shell +$ open ./output/html/index.html +```