Skip to content

build: emit warning for the doxygen target if tests and examples are disabled

The ns3 script currently warns that ./ns3 docs doxygen and ./ns3 docs all require tests/examples enabled to generate introspected documentation.

However, calling ./ns3 build doxygen (the real build system target, used by both ./ns3 docs doxygen|all) would result in a failure.

ns-3-dev$ ./ns3 build doxygen
[0/2] Re-checking globbed directories...
ninja: error: 'all-test-targets', needed by 'CMakeFiles/run-introspected-command-line', missing and no known rule to make it
Finished executing the following commands:
cd cmake-cache; cmake --build . -j 15 --target doxygen ; cd ..

This MR prevents that error by only creating the real doxygen target if examples and tests are enabled, and a stub doxygen target that prints a fallback informative warning.

[0/2] Re-checking globbed directories...
[1/1] cd /ns-3-dev/cmake-cache && echo The \'doxygen\' target called by \'./...s to generate introspected documentation. Enable examples and tests, or use \'doxygen-no-build\'.
The 'doxygen' target called by './ns3 docs doxygen|all' commands require examples and tests to generate introspected documentation. Enable examples and tests, or use 'doxygen-no-build'.
Finished executing the following commands:
cd cmake-cache; cmake --build . -j 15 --target doxygen ; cd ..

Merge request reports