[PATCH] D57996: [llvm] [cmake] Use current directory in GenerateVersionFromVCS
Michał Górny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 9 05:26:10 PST 2019
mgorny created this revision.
mgorny added reviewers: phosek, smeenai.
Herald added a project: LLVM.
Find dependent scripts of GenerateVersionFromVCS in current directory
rather than ../../cmake/modules. I do not see any reason why the former
would not work and The latter is incorrect when GenerateVersionFromVCS
is used from install directory (i.e. in stand-alone builds).
Repository:
rL LLVM
https://reviews.llvm.org/D57996
Files:
llvm/cmake/modules/GenerateVersionFromVCS.cmake
Index: llvm/cmake/modules/GenerateVersionFromVCS.cmake
===================================================================
--- llvm/cmake/modules/GenerateVersionFromVCS.cmake
+++ llvm/cmake/modules/GenerateVersionFromVCS.cmake
@@ -9,11 +9,9 @@
# where "<NAME>" is substituted with the names specified in the input variables,
# for each of the <NAME>_SOURCE_DIR given.
-get_filename_component(LLVM_DIR "${CMAKE_SCRIPT_MODE_FILE}" PATH)
-get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
-get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
+get_filename_component(LLVM_CMAKE_DIR "${CMAKE_SCRIPT_MODE_FILE}" PATH)
-list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}/cmake/modules")
+list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
include(VersionFromVCS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57996.186104.patch
Type: text/x-patch
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190209/fdd4ee8d/attachment.bin>
More information about the llvm-commits
mailing list