AviSynth/AviSynthPlus — pull request #23 by qyot27 (2013-12-11 10:18:31+00:00)
Title: [WIP] Dynamically generate revision number.

With the recent versioning change, I wanted to look at the output of Version() from the official build. However, I couldn't check the official build because it silently fails for me. So I built my own with VS2010 - that build works fine.

The issue was that my VS2010 build showed the literal 'rXXX' placeholder that was inserted into internal.h. I'm not sure if the officially released build actually showed r1555 or if it doing so was the result of manually editing it; as I mentioned before, it just silently fails (my guess is that the build is tuned explicitly for SSE2, analogous to GCC's -march/-mtune flags; I know there's an option in Visual Studio to control this, but I can't remember what it's called).

Anyway, this patch abstracts this so that the revision number is automatically generated. It uses cmake itself to call git and write the output to version.h, which internal.h then calls in.

This is very much a work-in-progress. A couple points that I'm unsure about:
A) The description in the mailing list was focused on the issue of not having to regenerate version.h when some files get changed, or avoiding having to re-run the cmake step to get it regenerated, or something like that. Whether or not this behavior is desired here (or if it would be noticed at all) is an open question, I guess.

B) What to point rev-list at: the patch points it at HEAD because if a user checks out a previous revision, it will report the revision number of that checked out commit.