This should hopefully ensure it gets generated before basic build happens. Fixes #11483.
#define GIT_VERSION "@VCS_TAG@"