[CMake] MinGW Compilers on Windows

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Dec 8 15:57:18 EST 2017


On 2017-12-08 14:44-0500 Kevan Hashemi wrote:

> Dear Konstantin,
>
>> Of course, but you should choose a suitable generator, e.g. -G "MinGW 
>> Makefiles"
>
> That makes perfect sense. Indeed, having selected "MinGW Makefiles" I don't 
> evgen have to specify the compilers, I can say "use native compilers". I also 
> had to add MinGW/bin to the Winodws path, so that CMake could run the native 
> compilers and test them without launching MSYS.

If you need/prefer Unix tools provided by MSYS to build your software,
another possible generator you should look at is "MSYS Makefiles". We
never tried it before PLplot moved on to using MinGW-w64/MSYS2 (see
below), but I think "Unix Makefiles" might work for most MinGW/MSYS
build needs as well.

You certainly have those three generator choices for the modern
rewrite of the MinGW/MSYS platform, MinGW-w64/MSYS2
<https://github.com/msys2/msys2/wiki>.  In addition, MinGW-w64/MSYS2
provides many more free-software libraries than provided by MinGW/MSYS
so if your software has soft dependencies on lots of such libraries
(as in our PLplot case) the MinGW-w64/MSYS2 platform is far
preferred over the MinGW/MSYS platform.

Note some of the above statements are summaries of what has been
figured out by those on the PLplot development team who have access to
the Microsoft version of Windows.  I only have access to the Wine
version of Windows which works OK for MinGW/MSYS, but there is currently
a Wine bug that blocks my attempts to install MinGW-w64/MSYS2.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list