tag:help.appveyor.com,2012-11-13:/discussions/problems/3193-cmake-building-for-mingw-issue-with-git-shexeAppVeyor: Discussion 2018-08-25T02:00:48Ztag:help.appveyor.com,2012-11-13:Comment/380835412015-10-01T23:54:14Z2015-10-01T23:54:15ZCMake building for MinGW issue with Git sh.exe<div><p>Hi,</p>
<p>I am trying to set up a config that uses CMake to build both
using MSVC and MinGW, but it appears CMake has an issue with the
installed Git putting sh.exe in PATH, when run with <code>-G "MinGW
Makefiles"</code>.</p>
<p>From <a href="https://ci.appveyor.com/project/jibsen/brieflz/build/1.1.0-11">https://ci.appveyor.com/project/jibsen/brieflz/build/1.1.0-11</a></p>
<pre>
<code>sh.exe was found in your PATH, here:
C:/Program Files (x86)/Git/bin/sh.exe
For MinGW make to work correctly sh.exe must NOT be in your path.
Run cmake from a shell that does not have sh.exe in your PATH.</code>
</pre></div>Jørgen Ibsentag:help.appveyor.com,2012-11-13:Comment/380835412015-10-02T02:14:46Z2015-10-02T02:14:57ZCMake building for MinGW issue with Git sh.exe<div><p>You can modify PATH variable and remove sh.exe from it.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380835412015-10-02T08:04:45Z2015-10-02T08:04:45ZCMake building for MinGW issue with Git sh.exe<div><p>Thank you for the reply.</p>
<p>I managed to get it to work with <code>set PATH=%PATH:C:\Program
Files (x86)\Git\bin;=%</code>.</p></div>Jørgen Ibsentag:help.appveyor.com,2012-11-13:Comment/380835412015-10-02T14:38:05Z2015-10-02T14:38:05ZCMake building for MinGW issue with Git sh.exe<div><p>Cool, thanks for the update!</p>
<p>Would you mind if I make this thread public to share the
solution with others?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380835412015-10-02T15:27:10Z2015-10-02T15:27:10ZCMake building for MinGW issue with Git sh.exe<div><p>Sure, in case it is of use to anyone, here is a link to the
<a href="https://github.com/jibsen/brieflz/blob/0c6fb73984f11e697dfaade5cdc5e291c1655c67/appveyor.yml">
appveyor.yml</a> I ended up with.</p>
<p>It uses your environment variable matrix to run CMake with
different generators, so it can test both MinGW, and 32- and 64-bit
MSVC without much scripting.</p></div>Jørgen Ibsentag:help.appveyor.com,2012-11-13:Comment/380835412015-10-02T16:46:18Z2015-10-02T16:46:18ZCMake building for MinGW issue with Git sh.exe<div><p>Great, thanks!</p></div>Feodor Fitsner