diff --git a/docs/build-clio.md b/docs/build-clio.md index 4fe00505..8e55f4e2 100644 --- a/docs/build-clio.md +++ b/docs/build-clio.md @@ -88,6 +88,32 @@ If successful, `conan install` will find the required packages and `cmake` will > [!TIP] > To generate a Code Coverage report, include `-o coverage=True` in the `conan install` command above, along with `-o tests=True` to enable tests. After running the `cmake` commands, execute `make clio_tests-ccov`. The coverage report will be found at `clio_tests-llvm-cov/index.html`. +### Generating API docs for Clio + +The API documentation for Clio is generated by [Doxygen](https://www.doxygen.nl/index.html). If you want to generate the API documentation when building Clio, make sure to install Doxygen on your system. + +To generate the API docs: + +1. First, include `-o docs=True` in the conan install command. For example: + + ```sh + mkdir build && cd build + conan install .. --output-folder . --build missing --settings build_type=Release -o tests=True -o lint=False -o docs=True + ``` + +2. Once that has completed successfully, run the `cmake` command and add the `--target docs` option: + + ```sh + cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release .. + cmake --build . --parallel 8 --target docs + ``` + +3. Go to `build/docs/html` to view the generated files. + + Open the `index.html` file in your browser to see the documentation pages. + + ![API index page](./img/doxygen-docs-output.png "API index page") + ## Building Clio with Docker It is also possible to build Clio using [Docker](https://www.docker.com/) if you don't want to install all the dependencies on your machine. diff --git a/docs/img/doxygen-docs-output.png b/docs/img/doxygen-docs-output.png new file mode 100644 index 00000000..fcdf1ef9 --- /dev/null +++ b/docs/img/doxygen-docs-output.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16e6f0a44b2dc7462f813f07ba754575e93033bc8bbfbe1d28f8bf1927915028 +size 394711