CMake building for MinGW issue with Git sh.exe

Jørgen Ibsen's Avatar

Jørgen Ibsen

01 Oct, 2015 11:54 PM

Hi,

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 -G "MinGW Makefiles".

From https://ci.appveyor.com/project/jibsen/brieflz/build/1.1.0-11

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.
  1. Support Staff 1 Posted by Feodor Fitsner on 02 Oct, 2015 02:14 AM

    Feodor Fitsner's Avatar

    You can modify PATH variable and remove sh.exe from it.

  2. 2 Posted by Jørgen Ibsen on 02 Oct, 2015 08:04 AM

    Jørgen Ibsen's Avatar

    Thank you for the reply.

    I managed to get it to work with set PATH=%PATH:C:\Program Files (x86)\Git\bin;=%.

  3. Support Staff 3 Posted by Feodor Fitsner on 02 Oct, 2015 02:38 PM

    Feodor Fitsner's Avatar

    Cool, thanks for the update!

    Would you mind if I make this thread public to share the solution with others?

  4. 4 Posted by Jørgen Ibsen on 02 Oct, 2015 03:27 PM

    Jørgen Ibsen's Avatar

    Sure, in case it is of use to anyone, here is a link to the appveyor.yml I ended up with.

    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.

  5. Support Staff 5 Posted by Feodor Fitsner on 02 Oct, 2015 04:46 PM

    Feodor Fitsner's Avatar

    Great, thanks!

  6. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:00 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

17 Jul, 2019 12:16 AM
17 Jul, 2019 12:15 AM
16 Jul, 2019 10:50 PM
16 Jul, 2019 07:47 PM
16 Jul, 2019 06:34 PM

 

16 Jul, 2019 05:17 PM
16 Jul, 2019 10:17 AM
16 Jul, 2019 07:46 AM
15 Jul, 2019 06:33 PM
15 Jul, 2019 06:09 PM
15 Jul, 2019 05:53 PM