<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 9:33 AM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>If you want to see what I tried, it was r190557, but that ended up getting reverted in r191784. I don't think I had the right approach, though.</div>
<div><br></div><div>The general problem is that CMake steps only run at configure time, which means if no CMakeLists are changed the repository version wouldn't generally get updated. In my patch I changed things to check the repository version every time, but that was expensive. (Still, it's no different from what the Makefile build does, right?)</div>
</blockquote></div><br>So, my suggestion would be to add a cmake command which runs as part of the build process that generates the version information, and add appropriate files to its dependencies. For example, for a git repository, adding '.git/HEAD' as a dependency would work. There is likely an analogous file that could be used to trigger (in the build system) rebuilding the version information when the VCS is updated.</div>
</div>