[llvm] r353674 - [llvm] [cmake] Use current directory in GenerateVersionFromVCS
Michal Gorny via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 11 01:07:07 PST 2019
Author: mgorny
Date: Mon Feb 11 01:07:07 2019
New Revision: 353674
URL: http://llvm.org/viewvc/llvm-project?rev=353674&view=rev
Log:
[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
Modified:
llvm/trunk/cmake/modules/GenerateVersionFromVCS.cmake
Modified: llvm/trunk/cmake/modules/GenerateVersionFromVCS.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/GenerateVersionFromVCS.cmake?rev=353674&r1=353673&r2=353674&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/GenerateVersionFromVCS.cmake (original)
+++ llvm/trunk/cmake/modules/GenerateVersionFromVCS.cmake Mon Feb 11 01:07:07 2019
@@ -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)
More information about the llvm-commits
mailing list