[llvm-commits] [llvm] r146324 - /llvm/trunk/cmake/modules/VersionFromVCS.cmake
Chandler Carruth
chandlerc at gmail.com
Sat Dec 10 02:04:38 PST 2011
Author: chandlerc
Date: Sat Dec 10 04:04:38 2011
New Revision: 146324
URL: http://llvm.org/viewvc/llvm-project?rev=146324&view=rev
Log:
Teach the VCS detection to set some root-level variables with the raw
revision and git commit data extracted. This will be used in the Clang
CMake build to avoid trying to re-detect the information.
Modified:
llvm/trunk/cmake/modules/VersionFromVCS.cmake
Modified: llvm/trunk/cmake/modules/VersionFromVCS.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/VersionFromVCS.cmake?rev=146324&r1=146323&r2=146324&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/VersionFromVCS.cmake (original)
+++ llvm/trunk/cmake/modules/VersionFromVCS.cmake Sat Dec 10 04:04:38 2011
@@ -13,6 +13,7 @@
if( Subversion_FOUND )
subversion_wc_info( ${CMAKE_CURRENT_SOURCE_DIR} Project )
if( Project_WC_REVISION )
+ set(SVN_REVISION ${Project_WC_REVISION} PARENT_SCOPE)
set(result "${result}-r${Project_WC_REVISION}")
endif()
endif()
@@ -30,6 +31,7 @@
if( git_result EQUAL 0 )
string(REGEX MATCH r[0-9]+ git_svn_rev ${git_output})
string(SUBSTRING "${git_svn_rev}" 1 -1 git_svn_rev_number)
+ set(SVN_REVISION ${git_svn_rev_number} PARENT_SCOPE)
set(git_svn_rev "-svn-${git_svn_rev}")
# Determine if the HEAD points directly at a subversion revision.
@@ -55,6 +57,7 @@
OUTPUT_VARIABLE git_output)
if( git_result EQUAL 0 AND NOT is_git_svn_rev_exact )
string(STRIP "${git_output}" git_ref_id)
+ set(GIT_COMMIT ${git_ref_id} PARENT_SCOPE)
set(result "${result}${git_svn_rev}-${git_ref_id}")
else()
set(result "${result}${git_svn_rev}")
More information about the llvm-commits
mailing list