Commit d2f8c5f8 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Brad King

FindSubversion: Use C locale to detect version (#11273)

Force LC_ALL to C before the call of the svn executable as it is done in
the Subversion_WC_INFO macro a few lines below.
parent 42126aaf
......@@ -52,12 +52,19 @@ FIND_PROGRAM(Subversion_SVN_EXECUTABLE svn
MARK_AS_ADVANCED(Subversion_SVN_EXECUTABLE)
IF(Subversion_SVN_EXECUTABLE)
# the subversion commands should be executed with the C locale, otherwise
# the message (which are parsed) may be translated, Alex
SET(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}")
SET(ENV{LC_ALL} C)
EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} --version
OUTPUT_VARIABLE Subversion_VERSION_SVN
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE "^(.*\n)?svn, [Vv]ersion ([.0-9]+).*"
# restore the previous LC_ALL
SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
STRING(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*"
"\\2" Subversion_VERSION_SVN "${Subversion_VERSION_SVN}")
MACRO(Subversion_WC_INFO dir prefix)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment