[llvm] r364742 - [benchmark] Disable CMake get_git_version

Andrew Ng via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 03:58:20 PDT 2019


Author: anng
Date: Mon Jul  1 03:58:20 2019
New Revision: 364742

URL: http://llvm.org/viewvc/llvm-project?rev=364742&view=rev
Log:
[benchmark] Disable CMake get_git_version

Disabled CMake get_git_version as it is meaningless for this in-tree
build, and hardcoded a null version.

Not using get_git_version avoids a refresh of the git index that is
executed by get_git_version. Refreshing the index can take a
considerable amount of time if the index needs to be refreshed
(particularly with the mono repo). This situation can arise when
building shared source on a host in VMs.

Differential Revision: https://reviews.llvm.org/D63925

Modified:
    llvm/trunk/utils/benchmark/CMakeLists.txt
    llvm/trunk/utils/benchmark/README.LLVM

Modified: llvm/trunk/utils/benchmark/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/benchmark/CMakeLists.txt?rev=364742&r1=364741&r2=364742&view=diff
==============================================================================
--- llvm/trunk/utils/benchmark/CMakeLists.txt (original)
+++ llvm/trunk/utils/benchmark/CMakeLists.txt Mon Jul  1 03:58:20 2019
@@ -76,8 +76,11 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_C
 
 
 # Read the git tags to determine the project version
-include(GetGitVersion)
-get_git_version(GIT_VERSION)
+# WARNING: This is meaningless for when the benchmark library is being built in-tree,
+# so disable it and hardcode a null version.
+# include(GetGitVersion)
+# get_git_version(GIT_VERSION)
+set(GIT_VERSION "v0.0.0")
 
 # Tell the user what versions we are using
 string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION ${GIT_VERSION})

Modified: llvm/trunk/utils/benchmark/README.LLVM
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/benchmark/README.LLVM?rev=364742&r1=364741&r2=364742&view=diff
==============================================================================
--- llvm/trunk/utils/benchmark/README.LLVM (original)
+++ llvm/trunk/utils/benchmark/README.LLVM Mon Jul  1 03:58:20 2019
@@ -21,3 +21,5 @@ Changes:
   is applied to fix building with MinGW headers for ARM
 * https://github.com/google/benchmark/commit/a9b31c51b1ee7ec7b31438c647123c2cbac5d956
   is applied to disable exceptions in Microsoft STL when exceptions are disabled
+* Disabled CMake get_git_version as it is meaningless for this in-tree build,
+  and hardcoded a null version




More information about the llvm-commits mailing list