[PATCH] D57063: [CMake] Unify scripts for generating VCS headers

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 02:55:19 PST 2019


mgorny added inline comments.


================
Comment at: llvm/cmake/modules/VersionFromVCS.cmake:58
+      if (EXISTS "${git_dir}/svn/refs")
+        execute_process(COMMAND ${GIT_EXECUTABLE} svn info
+          WORKING_DIRECTORY ${path}
----------------
phosek wrote:
> mgorny wrote:
> > Can't you reuse `get_source_info_git_svn` here?
> I considered it but that macro does some duplicate work like finding Git and finding the working directory which seems unnecessary.
Isn't the result cached? And if it isn't, can you cache it? Avoiding duplicate code makes future maintenance easier, and I think this is exactly the purpose of this diff.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57063/new/

https://reviews.llvm.org/D57063





More information about the llvm-commits mailing list