CMake SVNVersion fixes

Chandler Carruth chandlerc at google.com
Mon Feb 10 09:38:09 PST 2014


On Mon, Feb 10, 2014 at 9:33 AM, Jordan Rose <jordan_rose at apple.com> wrote:

> 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.
>
> 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?)
>

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140210/19ec3ec5/attachment.html>


More information about the cfe-commits mailing list