1
0
Эх сурвалжийг харах

FindSubversion: Fix for German localized client (#11273)

On a Win32 system with a German version of SilkSVN I couldn't run CMake
again on the working copy as the cache is displayed as corrupted. The
cause is that the regular expression to find the version number will not
match and put everything from the "svn --version" output into the cache,
which contains umlauts and other funny characters.

Fix the regexp to not only match " version " but also " Version " as
it's in the German output. I have no idea what will happen on a French
or Japanese system. This should be easy to test as it happens also on a
German Linux system.
Rolf Eike Beer 15 жил өмнө
parent
commit
42126aaf6c

+ 1 - 1
Modules/FindSubversion.cmake

@@ -57,7 +57,7 @@ IF(Subversion_SVN_EXECUTABLE)
     OUTPUT_VARIABLE Subversion_VERSION_SVN
     OUTPUT_STRIP_TRAILING_WHITESPACE)
 
-  STRING(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*"
+  STRING(REGEX REPLACE "^(.*\n)?svn, [Vv]ersion ([.0-9]+).*"
     "\\2" Subversion_VERSION_SVN "${Subversion_VERSION_SVN}")
 
   MACRO(Subversion_WC_INFO dir prefix)