I'm adding a functionality to my executable to run it with --version argument. The project is very big and uses multiple classes. I'd like to print out the versions of all of the classes.
Right now each of my classes has a function static void print_info() { cout << "information here" << endl; }
and the file with a main() calls print_info
of each class.
Question: Is there a way to upkeep the version number automatically with changes?
Additional information: I and my team use NetBeans for development. We also use Subversion (svn) and I know that it keeps revision numbers. Problem is only tangently related to the revision number. I want to be able to distribute an executable that will print the version number without accessing subversion server.
I'll be glad to provide more information if this is somewhat vague. Thanks!
P.S. I don't care what the version value is. Weather is an arbitrary number generated by NetBeans, or the corresponding subversion revision number, or just the date when the last modification was made.