This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Run User Program Before Compilation of a C-File

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?

Parents
  • I don't think there's any way to have it called only on a rebuild-all and not just a build.

    But I'm not sure why you'd want to do that.
    Surely, if any file is recompiled, then you need to identify the final image as different from any previous image - so it should get a new Build Number?

    Or perhaps I'm misunderstanding your requirement of a "Build Number"?

Reply
  • I don't think there's any way to have it called only on a rebuild-all and not just a build.

    But I'm not sure why you'd want to do that.
    Surely, if any file is recompiled, then you need to identify the final image as different from any previous image - so it should get a new Build Number?

    Or perhaps I'm misunderstanding your requirement of a "Build Number"?

Children