[PATCH] D34955: [Basic] Detect Git submodule version in CMake

Brian Gesiak via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 5 13:23:50 PDT 2017


modocache planned changes to this revision.
modocache added a comment.

Oh, nice catch @jordan_rose, you're absolutely right. I just tried updating my Git submodule reference for Clang and rebuilding my project, but the commit hash shown for Clang didn't change accordingly.

I'll need to find a file that changes on every commit. Following the Git submodule path, `gitdir: ../../.git/modules/external/llvm` and checking for `../../.git/modules/external/llvm/HEAD` appears to work. I might rewrite the patch to do that, or try migrating this to use LLVM's source control checking (I think it exists in `llvm/cmake/modules/VersionFromVCS.cmake`).


https://reviews.llvm.org/D34955





More information about the cfe-commits mailing list