<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    The command <br>
    <br>
        SET(ENV{LC_ALL} C)<br>
    <br>
    somewhere inside your cmake macro will do the trick. If you really
    care about the original contents of LC_ALL you should save it first
    and restore once your done.<br>
    <br>
    BTW: you might consider using the Subversion_WC_INFO() macro in the
    FindSubversion module.<br>
    <br>
    Cheers,<br>
    Marcel Loose.<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 02/07/14 09:04, Eric Noulard wrote:<br>
    </div>
    <blockquote
cite="mid:CAPASGLp8nkNA053qfvBbdwHxpf_UUQ8e8dX5oEDp3_CxCbWrLg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>May be you can avoid localized output by setting LANG env
          var to "C".<br>
          <br>
          <br>
        </div>
        Or you can ask svn for xml output which may not be localized
        e.g.<br>
        <br>
        # Get the SVN revision number of an svn command line client is<br>
        # available.  This version will run at build time rather than
        only<br>
        # at configuration generation time.<br>
        FIND_PROGRAM(SVN_EXECUTABLE svn<br>
          DOC "subversion command line client")<br>
        <br>
        # only do this if we have an svn client.<br>
        if (SVN_EXECUTABLE)<br>
            MACRO(Subversion_GET_REVISION dir variable)<br>
              EXECUTE_PROCESS(COMMAND ${SVN_EXECUTABLE} --xml info
        ${dir}<br>
                OUTPUT_VARIABLE ${variable}<br>
                OUTPUT_STRIP_TRAILING_WHITESPACE)<br>
              STRING(REGEX REPLACE
        ".*entry.*revision=\"([0-9]+)\"\n.*kind.*"<br>
                "\\1" ${variable} "${${variable}}")<br>
            ENDMACRO(Subversion_GET_REVISION)<br>
        <br>
            Subversion_GET_REVISION(${CMAKE_SOURCE_DIR} ORX_BLD_LVL)<br>
        endif ()<br>
        <br>
        message(STATUS "SVN Revision Number is ${ORX_BLD_LVL}")<br>
        <br>
        <br>
        <div>
          <div>
            <div class="gmail_extra"><br>
              <br>
              <div class="gmail_quote">2014-07-02 1:04 GMT+02:00 Rick
                McGuire <span dir="ltr"><<a moz-do-not-send="true"
                    href="mailto:object.rexx@gmail.com" target="_blank">object.rexx@gmail.com</a>></span>:<br>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">
                  <div dir="ltr">We like to include the SVN revision
                    number in our build artifacts to help keep track of
                    what version people are working with.  I found the
                    following code on the mailing lists which appears to
                    work fine:  
                    <div>
                      <br>
                    </div>
                    <div>
                      <div style="font-family:'Bitstream Vera Sans
                        Mono';font-size:11pt;color:rgb(0,0,0)">
                        <pre># Get the SVN revision number of an svn command line client is
# available.  This version will run at build time rather than only
# at configuration generation time.
FIND_PROGRAM(SVN_EXECUTABLE svn
  DOC "subversion command line client")

# only do this if we have an svn client.
if (SVN_EXECUTABLE)
    MACRO(Subversion_GET_REVISION dir variable)
      EXECUTE_PROCESS(COMMAND ${SVN_EXECUTABLE} info ${dir}
        OUTPUT_VARIABLE ${variable}
        OUTPUT_STRIP_TRAILING_WHITESPACE)
      STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
        "\\2" ${variable} "${${variable}}")
    ENDMACRO(Subversion_GET_REVISION)

    Subversion_GET_REVISION(${CMAKE_SOURCE_DIR} ORX_BLD_LVL)
endif ()

message(STATUS "SVN Revision Number is ${ORX_BLD_LVL}")
</pre>
                        <pre>
</pre>
                        <pre>Unfortunately, the first person not in the core team who building was running a Spanish language version of SVN, so the ORX_BLD_LEVEL variable ended up with the entire output of the svn info command because it could not find the string REVISION.  This was not a good thing!</pre>
                        <pre>
</pre>
                        <pre>Is there a better way to obtain the SVN revision number that does not suffer from this sort of problem?</pre>
                        <span class=""><font color="#888888">
                            <pre>
</pre>
                            <pre>Rick</pre>
                          </font></span></div>
                    </div>
                  </div>
                  <br>
                  --<br>
                  <br>
                  Powered by <a moz-do-not-send="true"
                    href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
                  <br>
                  Please keep messages on-topic and check the CMake FAQ
                  at: <a moz-do-not-send="true"
                    href="http://www.cmake.org/Wiki/CMake_FAQ"
                    target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
                  <br>
                  Kitware offers various services to support the CMake
                  community. For more information on each offering,
                  please visit:<br>
                  <br>
                  CMake Support: <a moz-do-not-send="true"
                    href="http://cmake.org/cmake/help/support.html"
                    target="_blank">http://cmake.org/cmake/help/support.html</a><br>
                  CMake Consulting: <a moz-do-not-send="true"
                    href="http://cmake.org/cmake/help/consulting.html"
                    target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
                  CMake Training Courses: <a moz-do-not-send="true"
                    href="http://cmake.org/cmake/help/training.html"
                    target="_blank">http://cmake.org/cmake/help/training.html</a><br>
                  <br>
                  Visit other Kitware open-source projects at <a
                    moz-do-not-send="true"
                    href="http://www.kitware.com/opensource/opensource.html"
                    target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
                  <br>
                  Follow this link to subscribe/unsubscribe:<br>
                  <a moz-do-not-send="true"
                    href="http://public.kitware.com/mailman/listinfo/cmake"
                    target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
                </blockquote>
              </div>
              <br>
              <br clear="all">
              <br>
              -- <br>
              Erk<br>
              L'élection n'est pas la démocratie -- <a
                moz-do-not-send="true" href="http://www.le-message.org"
                target="_blank">http://www.le-message.org</a>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>