cppalliance / mrdocs

MrDocs: A Clang/LLVM tool for building reference documentation from C++ code and javadoc comments.
https://mrdocs.com
Other
75 stars 16 forks source link

First use of MrDox: configuration #669

Open Becheler opened 2 weeks ago

Becheler commented 2 weeks ago

Hi people, Amazing job on mrdox ! I'm trying to use it :) I have the following folder structure:

APP [DEV CONTAINER: C++ ...]
├── build
├── docs
├── example
├── mrdox
│   ├── CMakeLists.txt
│   ├── coalescence.cpp
│   ├── config.yaml
│   ├── demography.cpp
│   ├── expressive.cpp
│   ├── geography.cpp
│   └── io.cpp
├── src
├── test
├── CMakeLists.txt

Example of a mrdox/*.cpp file:

#include "quetzal/coalescence.hpp"
int main(){ return 0; }
alandefreitas commented 1 day ago

Yes. source-root looks correct. For the compilation-database option, it might be the path to you compile_commands.json or the path to your CMakeLists.txt (so that mrdocs runs it for you and gets the compile_commands.json). If you give it a CMakeLists.txt file, then you can also use the cmake option to define arguments for the cmake configuration step.

alandefreitas commented 1 day ago

Here's a more complete example: https://github.com/boostorg/url/blob/develop/doc/mrdocs.yml

It'll also use CMakeLists.txt in source-root if no compilation-database is provided.