We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm calling a user program to make a file called buildNr.h which contains
#define _BUILD_ 123
This file is included in the project. I inserted the command into the "Options for Target - User - Run User ..." This works but the disadvantage is, the tool is called every time a file gets compiled and since the project contains >12 files its timeconsuming and increments _BUILD_ by 12. Any better solution?
Ref: http://www.keil.com/forum/docs/thread10615.asp
You never did say why you can't just use __DATE__ and __TIME__ ...?
Anyhow, add the thing that creates the header as a separate item, and make it the very first in the project: that way it won't be run on every individual compile - only when you build or rebuild-all.
See also: http://www.keil.com/forum/docs/thread780.asp
You never did say why you can't just use __DATE__ and __TIME__ ...? The customer wants Date, Time and Build !!
I need DATE and TIME in old style.
And it doesn't matter if I change 1, 2, ... or all source files. If I get a new output file I need the current DATE+TIME cause it's not the same the the one before.
I would expect that a BUILD number is also incremented.
But I haven't a solution to run the tool only at rebuild all, sorry.
G.