[llvm-commits] [PATCH] [CMAKE] Fix git-svn output parsing

pravic ehysta at gmail.com
Tue Nov 6 07:27:08 PST 2012


This prevents cmake fail on git-svn based repositories.

http://llvm-reviews.chandlerc.com/D104

Files:
  cmake/modules/VersionFromVCS.cmake

Index: cmake/modules/VersionFromVCS.cmake
===================================================================
--- cmake/modules/VersionFromVCS.cmake
+++ cmake/modules/VersionFromVCS.cmake
@@ -28,7 +28,7 @@
                       TIMEOUT 5
                       RESULT_VARIABLE git_result
                       OUTPUT_VARIABLE git_output)
-      if( git_result EQUAL 0 )
+      if( (git_result EQUAL 0) AND NOT (git_output STREQUAL "") )
         string(REGEX MATCH r[0-9]+ git_svn_rev ${git_output})
         string(LENGTH "${git_svn_rev}" rev_length)
         math(EXPR rev_length "${rev_length}-1")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104.1.patch
Type: text/x-patch
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121106/2d71bcfa/attachment.bin>


More information about the llvm-commits mailing list