Doxygen Setup#
Unix Console Doxygen Setup#
Check for
doxygen
|
You may well already have doxygen installed but is it most likely in your systems repositories. If not, build from source here. |
Run cmake |
CMake will generate the doxygen config file in ${CMAKE_DIR}/Framework/Doxygen/Mantid.doxyfile |
You’re done!
Try!
|
|
Visual Studio Doxygen Setup#
Install doxygen binaries |
Download the Windows binaries and install them. I’ll assume in the following you installed doxygen in c:program filesdoxygen |
Rerun CMake |
Run cmake for the build to ensure that the Mantid.doxyfile is created |
Add VC++ Tool: “DoxyGen” |
|
Add VC++ Tool: “view DoxyGen” |
|
You’re done! Try! “DoxyGen” |
|
Eclipse Doxygen Setup#
Check for doxygen |
You may well already have doxygen installed, but if not you can install it at the same time as the plugin below via the update site |
Run cmake |
This will generate the doxygen config file in ${CMake_DIR}/Framework/Doxygen/Mantid.doxygen |
Install Eclipse plugin: “Eclox” |
|
You’re done! Try! |
|
Fixing Common Warnings#
Found unknown command
Doxygen reads a backslash in a comment as the start of a command, so text
such as \lambda gives Found unknown command '\lambda'. Write \\ if
you need a literal backslash:
/// Neutron velocity: v = h / (m_n \\lambda)
Argument of command @param is not found in the argument list
Doxygen matches @param names against the parameter names in the
declaration. If the header leaves a parameter unnamed, or names it differently
from the source file, Doxygen cannot match it. Use the same name in both (see
also C++ Coding Standards, which requires parameters in declarations to be
named):
// .h
void setInstrument(const Geometry::Instrument_const_sptr &instr);
// .cpp
void ExperimentInfo::setInstrument(const Instrument_const_sptr &instr) { ... }
The following parameters are not documented
A function’s documentation lists some parameters but not all of them. Add the
missing @param:
/**
* Add a number to a calculated value.
* @param i :: An index of a value 0 <= i < size()
* @param value :: The value to add at the given index
*/
void addToCalculated(size_t i, double value);