]> granicus.if.org Git - llvm/commitdiff
CMake: ignore git stderr when trying to sort out revision. NFC.
authorTim Northover <tnorthover@apple.com>
Fri, 28 Apr 2017 16:06:00 +0000 (16:06 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 28 Apr 2017 16:06:00 +0000 (16:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301650 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/VersionFromVCS.cmake
include/llvm/Support/CMakeLists.txt

index 983b48fefa0e9538a23871320d90b1c87127b1c4..a2ff4c0776a531f5e1ec4d64cd337613e30cffac 100644 (file)
@@ -45,7 +45,8 @@ function(add_version_info_from_vcs VERS)
             WORKING_DIRECTORY ${SOURCE_DIR}
             TIMEOUT 5
             RESULT_VARIABLE git_result
-            OUTPUT_VARIABLE git_output)
+            OUTPUT_VARIABLE git_output
+            ERROR_QUIET)
           if( git_result EQUAL 0 )
             string(REGEX MATCH "URL: ([^ \n]*)" svn_url ${git_output})
             if(svn_url)
index 825052171cd7bfdd749d04f911aa0ed974a679d3..c58ccf216303c16ef0cdf1f5554cb4ff7d95ac29 100644 (file)
@@ -14,7 +14,8 @@ macro(find_first_existing_vc_file out_var path)
   execute_process(COMMAND ${git_executable} rev-parse --git-dir
     WORKING_DIRECTORY ${path}/cmake
     RESULT_VARIABLE git_result
-    OUTPUT_VARIABLE git_dir)
+    OUTPUT_VARIABLE git_dir
+    ERROR_QUIET)
   if(git_result EQUAL 0)
     string(STRIP "${git_dir}" git_dir)
     set(${out_var} "${git_dir}/logs/HEAD")