title: CMake: how to get the backslash literal in Regexp replace?
body: <p>I am trying to replace forwardslashes with backslashes.
  To do that i have the following line of code:</p>
  
  <pre><code>STRING(REGEX REPLACE "/" "\\" SourceGroup ${SourceGroupPath} )
  </code></pre>
  
  <p>SourceGroupPath = A/File/Path.
  SourceGroup is the variable to set the result to.</p>
  
  <p>The problem i am having is with, the "\\" part to the code.
  I have tried several ways to getting to use the backslash literal like "\\"
  and using unicode but nothing seems to work.</p>
  
  <p>The error i get in CMake is:</p>
  
  <blockquote>
    <p>CMake Error at CMakeLists.txt:41
    (STRING):   string sub-command REGEX,
    mode REPLACE: replace-expression ends
    in a backslash.</p>
  </blockquote>
  
  <p>Can someone please help me out?</p>
  
  <p>Thanks,</p>
  
  <p>Wouter</p>