You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you don't want to depend on the [Bazel package registry](https://bazel.build/external/bazelbuild/rules_pkg) or you want to use a not-yet-published version of this module, you can use an archive override by adding the following lines below the `bazel_dep` rule in your _MODULE.bazel_ file:
| <aid="doxygen-hide_in_body_docs"></a>hide_in_body_docs | Whether to hide in body docs. |`None`|
78
78
| <aid="doxygen-exclude_symbols"></a>exclude_symbols | A list of symbols to exclude. |`[]`|
79
79
| <aid="doxygen-example_path"></a>example_path | The path to the examples. They must be added to the source files. |`None`|
80
+
| <aid="doxygen-dot_executable"></a>dot_executable | Label of the doxygen executable. Make sure it is also added to the `srcs` of the macro |`None`|
80
81
| <aid="doxygen-configurations"></a>configurations | A list of additional configuration parameters to pass to Doxygen. |`[]`|
81
82
| <aid="doxygen-doxyfile_template"></a>doxyfile_template | The template file to use to generate the Doxyfile. The following substitutions are available:<br> - `# {{INPUT}}`: Subpackage directory in the sandbox.<br> - `# {{ADDITIONAL PARAMETERS}}`: Additional parameters given in the `configurations` attribute.<br> - `# {{OUTPUT DIRECTORY}}`: The directory provided in the `outs` attribute. |`"@doxygen//:Doxyfile.template"`|
82
83
| <aid="doxygen-doxygen_extra_args"></a>doxygen_extra_args | Extra arguments to pass to the doxygen executable. |`[]`|
This is an example of how to use the `doxygen` alongside `graphviz` to generate inheritance diagrams for C++ classes.
4
+
By default, `doxygen` looks for the `dot` executable in the system path, meaning that a system installation of `graphviz` will work out of the box.
5
+
If you want to make the build fully hermetic, you can specify the path to the `dot` executable in the `doxygen` rule, making it point to a `dot` binary of your choosing.
6
+
7
+
```bash
8
+
bazel build //doxyfile:doxygen
9
+
```
10
+
11
+
## Custom dot binary
12
+
13
+
To ensure the `dot` binary is available to the rule, make sure to add it to the sources of the macro.
14
+
Also, remember to add the `have_dot = True` parameter, otherwise no graphs will be produced.
15
+
16
+
```bzl
17
+
load("@doxygen//:doxygen.bzl", "doxygen")
18
+
19
+
# Assuming the binary is located in the same folder
20
+
21
+
filegroup(
22
+
name="dot_executable",
23
+
srcs= select(
24
+
{
25
+
"@platforms//os:linux": ["dot"],
26
+
"@platforms//os:macos": ["dot"],
27
+
"@platforms//os:windows": ["dot"],
28
+
},
29
+
"Unsupported platform",
30
+
),
31
+
)
32
+
33
+
# Ideally, instead of using a local filegroup, you would want and external module, like "@graphviz//:bin/dot"
0 commit comments