0

I have an Eclipse (Luna) CDT project and I'd like to automatically include build version numbers in the output file name. The build version is available in code as:

#define MAJOR           1
#define MINOR           4
#define BUILDNUM        9

The BUILDNUM macro is updated by a script as a pre-build step.

Is it possible to use these preprocessor definitions/macros in the project settings under "Build → Linker → Basic Options → Specify Output File Name"?

If not, is there another (preferred) way to specify and track build numbers symbolically so that they're available to both the environment and the code?

mtbkrdave
  • 2,900
  • 3
  • 23
  • 24
  • So what is your prebuild step is doing exactly? Maybe just do the same in the postbuild and rename the output artifact accordingly. – Eugene Sh. Mar 18 '15 at 17:50
  • The pre-build script updates the build-date, build-time and build-num #define strings in a "buildinfo.h" header file. I suppose renaming the output file as a post-build step would be an easy way to skin that cat... – mtbkrdave Mar 18 '15 at 17:55

0 Answers0