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

2017-07-17 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. Awesome, thanks @jordan_rose! https://reviews.llvm.org/D34955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-07-17 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose accepted this revision. jordan_rose added a comment. This revision is now accepted and ready to land. Whoops, yes, this new version looks good! https://reviews.llvm.org/D34955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

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

2017-07-15 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. Friendly ping! I'm pretty excited about this change, it helps a pet project of mine, which builds Clang and LLVM checked out as submodules, display correct revision information. Let me know if I can modify this change at all, to make it easier to accept. https://rev

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

2017-07-12 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 106367. modocache added a comment. Use CMAKE_MATCH_0 instead of using REGEX REPLACE. Thanks for the suggestion! https://reviews.llvm.org/D34955 Files: lib/Basic/CMakeLists.txt Index: lib/Basic/CMakeLists.txt ===

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

2017-07-10 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose added inline comments. Comment at: lib/Basic/CMakeLists.txt:27 +STRING(REGEX REPLACE "\n" "" file_contents "${file_contents}") +if ("${file_contents}" MATCHES "^gitdir:") + # '.git' is indeed a link to the submodule's Git directory. How a

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

2017-07-09 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 105674. modocache edited the summary of this revision. modocache removed a subscriber: pcc. modocache added a comment. Update commit message. https://reviews.llvm.org/D34955 Files: lib/Basic/CMakeLists.txt Index: lib/Basic/CMakeLists.txt =

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

2017-07-09 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 105673. modocache added a comment. Use submodule's .git directory. https://reviews.llvm.org/D34955 Files: lib/Basic/CMakeLists.txt Index: lib/Basic/CMakeLists.txt === --- lib/Basic/CMakeL

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

2017-07-05 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose added a comment. I'm not sure why we would care if a commit is made on a branch. The important information here is what commit is checked out, and that's what HEAD refers to. https://reviews.llvm.org/D34955 ___ cfe-commits mailing list

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

2017-07-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. FYI, I don't think `HEAD` on its own will work because it is not necessarily updated on every commit, see discussion on https://reviews.llvm.org/D31985. https://reviews.llvm.org/D34955 ___ cfe-commits mailing list cfe-commits@l

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

2017-07-05 Thread Brian Gesiak via Phabricator via cfe-commits
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 f

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

2017-07-03 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose requested changes to this revision. jordan_rose added a comment. This revision now requires changes to proceed. If I'm remembering correctly from when I set this up, this isn't just about detecting which version control system you're using; it's about finding a file //that will chang

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

2017-07-03 Thread Brian Gesiak via Phabricator via cfe-commits
modocache created this revision. Herald added a subscriber: mgorny. When searching for Git version control information, libBasic's CMake checks for the path '.git/logs/HEAD'. However, when LLVM is included as a Git submodule, this path does not exist. Instead, it contains a '.git' file with the fo