title: CMake list to string: simple semicolon replacement
body: <p>I am confused with a very simple example. I have a standard list, so basically its string representation uses semicolon as delimiters. I want to replace it by another one:</p>
  
  <pre><code>set(L1 "A" "B" "C")
  message("L1: ${L1}")
  
  string(REPLACE ";" "&lt;-&gt;" L2 ${L1})
  message("L2: ${L2}")
  </code></pre>
  
  <p>this snippet prints:</p>
  
  <pre><code>L1: A;B;C
  L2: ABC
  </code></pre>
  
  <p>and I don't understand why. According <a href="https://stackoverflow.com/a/7172941/1887976">to some other SO answers</a>, my string replacement seems valid. What am I doing wrong ? Is there a way to store the value <code>A&lt;-&gt;B&lt;-&gt;C</code> in my 2nd variable ?</p>
  
  <p>Note: I use CMake 3.7.2</p>