Skip to content

Commit

Permalink
CMake: ignore git stderr when trying to sort out revision. NFC.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301650 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
TNorthover committed Apr 28, 2017
1 parent 98e89d3 commit 0bda850
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmake/modules/VersionFromVCS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion include/llvm/Support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 0bda850

Please sign in to comment.