I\'d like to implement a way of recording the version of a project within code, so that it can be used when testing and to help track bugs. It seems the best version number
A good up-to-date solution:
Create a Makefile containing the following line (in the same folder as YourFile.dox):
sed "s~RevNumber~$(shell svnversion ../)~g" YourFile.dox > YourFileDummy.dox; doxygen YourFileDummy.dox
And YourFile.dox should contain this:
...
PROJECT_NUMBER = "Revision RevNumber"
...
Now:
sed replaces RevNumber in the .dox with the output of svnversion (executed in the main folder of your repository) and saves the modified file to YourFileDummy.doxdoxygen is executed on YourFileDummy.dox to generate the documentation