Answer the question
In order to leave comments, you need to log in
How to automatically change define in MSVC?
I want in MSVC 2013 Express at build time, so that one of my definitions would be something like this:
HG_VERSION="%shell cd ../ && hg identify -n -i -t%" in the project properties.
Please tell me how to achieve this. Or how to achieve a similar result but perhaps in a different way.
Thank you in advance.
Answer the question
In order to leave comments, you need to log in
I did this: I added the generation of a minimal header file to the pre-build event, and included it in the source code.
We ran a python script on the buildserver, which, according to certain laws, generated a header with the necessary version definitions for us. The older version was changed by hand, but the script took the iteration number from our website on the Internet.
The script is written literally in 5 minutes.
Perhaps there are simpler solutions for your case.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question