# Generating the Code Reference {#documentation} When Doxygen is present, the build offers a `docs` target that generates the API and source reference from the documentation comments carried in the headers and sources, together with the documents in `docs/PROSE/` as its pages. `src/documentation.cpp` declares which documents those are and in what order; `docs/CMakeLists.txt` configures the generator and defines the target. One command generates it: ``` cmake --build --target docs ``` The finished documents land in `/docs/`: ``` /docs/pdf/dpm-core-.pdf the PDF reference /docs/html/index.html the HTML reference /docs/tmp/ scratch space for the generators ``` Doxygen and LaTeX both work under `docs/tmp/`, and the finished document is copied up into `docs/`. `cmake --build --target clean` removes the whole tree. Both formats are produced by default. Either can be turned off at configure time: - **`-DDPM_DOCS_PDF`** (default ON) — PDF reference, via Doxygen's native LaTeX output; requires `pdflatex` and `makeindex` - **`-DDPM_DOCS_HTML`** (default ON) — HTML reference ``` cmake -B -DDPM_DOCS_PDF=OFF cmake --build --target docs ```