OT-Sort of--> Versioning

M

Michael

Hi,
Is there any standard mechanism for versioning when compiling.......
what i want is to increment a counter everytime a source file is
compiled. Are there any vendor specific ways people know? Maybe using
'make'??
I know i could write a checksum and version number to a text file and
then read it back it and compare it against a checksum of argv[0] but
its a bit crude!!

Regards

Michael
 
G

Gernot Frisch

Michael said:
Hi,
Is there any standard mechanism for versioning when compiling.......
what i want is to increment a counter everytime a source file is
compiled. Are there any vendor specific ways people know? Maybe
using 'make'??
I know i could write a checksum and version number to a text file
and then read it back it and compare it against a checksum of
argv[0] but its a bit crude!!

I use the __DATE__ macro from VC++, since one day is enough for me.
 
F

flagos

Gernot:

__DATE__ will give you "The compilation date of the current source
file". The point is if you are compiling incrementally, perhaps that
date wont be today. :-/

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top