title: How to modify environment variables passed to custom CMake target?
body: <p>Perhaps I am missing something obvious, but I can't seem to figure out how to explicitly set environment variables that can be seen by processes launched through <a href="https://cmake.org/cmake/help/v3.0/command/add_custom_target.html"><code>add_custom_target()</code></a>.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>set(ENV{PATH} "C:/Some/Path;$ENV{PATH}")
  add_custom_target(newtarget somecommand)
  </code></pre>
  
  <p>Unfortunately, the <code>%PATH%</code> environment variable appears unchanged to <code>somecommand</code>. (I have set up a Gist that reproduces the problem <a href="https://gist.github.com/nathan-osman/785152e6452559852fc8">here</a>.)</p>
  
  <p>What am I doing wrong?</p>