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
# 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)