Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit b041a36

Browse files
committed
[llvm] [cmake] Use current directory in GenerateVersionFromVCS
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). Differential Revision: https://reviews.llvm.org/D57996 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353674 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 035c5fe commit b041a36

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cmake/modules/GenerateVersionFromVCS.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
# where "<NAME>" is substituted with the names specified in the input variables,
1010
# for each of the <NAME>_SOURCE_DIR given.
1111

12-
get_filename_component(LLVM_DIR "${CMAKE_SCRIPT_MODE_FILE}" PATH)
13-
get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
14-
get_filename_component(LLVM_DIR "${LLVM_DIR}" PATH)
12+
get_filename_component(LLVM_CMAKE_DIR "${CMAKE_SCRIPT_MODE_FILE}" PATH)
1513

16-
list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}/cmake/modules")
14+
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
1715

1816
include(VersionFromVCS)
1917

0 commit comments

Comments
 (0)