Reputation: 2819
I would like to document my code in a flexible way such that when something changes e.g. version, year (copyright), I do not need to make the changes manually in my >100 files. My header looks like:
/**
* \file main.cpp
* \copyright Copyright <2009-2014>
* \version 0.1
*/
2014 and 0.1 are two constants that will change constantly. Is there a way to define them somewhere in the project-file of Doxygen and automatically. Is there any way to update these constants automatically?
Upvotes: 1
Views: 451
Reputation: 14879
As Albert suggested you can define an alias in the configuration file
ALIASES += thisyear=2014
/**
* \file main.cpp
* \copyright Copyright <2009-\thisyear>
* \version 0.1
*/
Alternatively, you can set THISYEAR as an environment variable and use
/**
* \file main.cpp
* \copyright Copyright <2009-$(THISYEAR)>
* \version 0.1
*/
Upvotes: 1