From 70b0b2a2e3d4661d5df2a487cf519a4509a89c6f Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Tue, 21 May 2013 15:44:08 -0400
Subject: revise test for hg to detect and ignore incorrect results from cygwin
 hg

---
 indra/cmake/BuildVersion.cmake | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'indra/cmake')

diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake
index c494355746..0094e313c7 100755
--- a/indra/cmake/BuildVersion.cmake
+++ b/indra/cmake/BuildVersion.cmake
@@ -22,12 +22,12 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n
                  OUTPUT_VARIABLE VIEWER_VERSION_REVISION
                  OUTPUT_STRIP_TRAILING_WHITESPACE
                  )
-              if (DEFINED VIEWER_VERSION_REVISION)
+              if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
                  message("Revision (from hg) ${VIEWER_VERSION_REVISION}")
-              else (DEFINED VIEWER_VERSION_REVISION)
+              else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
                  set(VIEWER_VERSION_REVISION 0 )
                  message("Revision not set, repository not found, using ${VIEWER_VERSION_REVISION}")
-              endif (DEFINED VIEWER_VERSION_REVISION)
+              endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
            else (DEFINED MERCURIAL)
               set(VIEWER_VERSION_REVISION 0)
               message("Revision not set, 'hg' not found (${MERCURIAL}), using ${VIEWER_VERSION_REVISION}")
-- 
cgit v1.2.3