title: How to set PATH environment variable in CMake script?
body: <p>I want to build my sources by Mingw compiler which in not placed on my system PATH.
  I tried this in the beginning of my script:</p>
  <pre><code>set(Env{PATH} &quot;c:/MyProject/Tools/mingw/bin/&quot; &quot;c:/MyProject/Tools/mingw/msys/1.0/bin/&quot;)
  </code></pre>
  <p>And this:</p>
  <pre><code>set(CMAKE_PROGRAM_PATH &quot;c:/MyProject/Tools/mingw/bin/&quot;   &quot;c:/MyProject/Tools/mingw/msys/1.0/bin/&quot;)
  set(CMAKE_LIBRARY_PATH &quot;c:/MyProject/Tools/mingw/bin/&quot; &quot;c:/MyProject/Tools/mingw/msys/1.0/bin/&quot;)
  set(CMAKE_SYSTEM_PROGRAM_PATH &quot;c:/MyProject/Tools/mingw/bin/&quot; &quot;c:/MyProject/Tools/mingw/msys/1.0/bin/&quot;)
  set(CMAKE_SYSTEM_PREFIX_PATH &quot;c:/MyProject/Tools/mingw/bin/&quot; &quot;c:/MyProject/Tools/mingw/msys/1.0/bin/&quot;)
  </code></pre>
  <p>The first variant doesn't work at all. A suggest that I can't overwrite the value of the environment variable in CMake script.
  The second script finds my mingw compiler, but catches the error while running gcc (can't find libgmp-10.dll which needs by gcc). This is because the PATH variable is not set to my Mingw.</p>