diff --git a/CMakeModules/CreateGitVersionHeader.cmake b/CMakeModules/CreateGitVersionHeader.cmake index 51b69eda56..2853fe149e 100644 --- a/CMakeModules/CreateGitVersionHeader.cmake +++ b/CMakeModules/CreateGitVersionHeader.cmake @@ -38,8 +38,8 @@ macro( create_git_version_header _git_src_path ) ${GIT_EXECUTABLE} describe --dirty WORKING_DIRECTORY ${_git_src_path} OUTPUT_VARIABLE _git_DESCRIBE - ERROR_VARIABLE _git_log_error - RESULT_VARIABLE _git_log_result + ERROR_VARIABLE _git_describe_error + RESULT_VARIABLE _git_describe_result OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process( @@ -47,8 +47,8 @@ macro( create_git_version_header _git_src_path ) ${GIT_EXECUTABLE} rev-list --count --first-parent HEAD WORKING_DIRECTORY ${_git_src_path} OUTPUT_VARIABLE _git_REV_COUNT - ERROR_VARIABLE _git_log_error - RESULT_VARIABLE _git_log_result + ERROR_VARIABLE _git_rev_count_error + RESULT_VARIABLE _git_rev_count_result OUTPUT_STRIP_TRAILING_WHITESPACE) set( ENV{LC_ALL} ${_Git_SAVED_LC_ALL} ) @@ -56,11 +56,11 @@ macro( create_git_version_header _git_src_path ) # Check to make sure 'git' command did not fail. Otherwise fallback # to KiCadVersion.cmake as the revision level. - if( _git_DESCRIBE ) + if( _git_describe_result EQUAL 0 ) set( KICAD_VERSION "(${_git_DESCRIBE})" ) endif() - if( _git_REV_COUNT ) + if( _git_rev_count_result EQUAL 0 ) set( KICAD_GIT_REV "${_git_REV_COUNT}" ) # Sanity check