[CMake] cmake on MinGW64; which generator
Alan W. Irwin
Alan.W.Irwin1234 at gmail.com
Sun Jun 23 11:22:14 EDT 2019
On 2019-06-23 07:49-0600 Christopher Webster wrote:
> Greetings,
>
> I am trying to figure out which generator to use on MinGW64 on Windows10, the 2-3 I have tried fail.
>
> cmake version is 3.14.5
>
>
> If I try "Unix Makefiles" I get:
>
> $ cmake -S coin -B coin_build -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Tools\Packages\Coin3D
> -- The C compiler identification is GNU 9.1.0
> -- The CXX compiler identification is GNU 9.1.0
> System is unknown to cmake, create:
> Platform/MINGW64_NT-10.0-17763 to use this system, please send your
> config file to cmake at www.cmake.org so it can be added to cmake
>
>
>
> If I try "MinGW Makefiles" I get:
>
> $ cmake -S coin -B coin_build -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Tools\Packages\Coin3D
> CMake Error: Could not create named generator MinGW Makefiles
>
There are a lot of different platforms that use the MinGW-w64 compiler so you should probably
describe the platform where you are attempting to use that compiler in more detail. For example,
it sounds like you are simply taking a normal Window platform and downloading the
MinGW-w64 compiler for that platform, but what is the exact URL for that download?
I don't have any recent direct experience myself (I have no access to
Microsoft Windows and Wine Windows bugs are currently blocking access
to MSYS2), but PLplot developers I am aquainted with have recently had
a lot of success with the [MSYS2
platform](https://github.com/msys2/msys2/wiki) which is another exaple
of a platform that uses the MinGW-w64 compiler. For that platform
they have found that "Unix Makefiles" and "MSYS Makefiles" generally
give good results. They haven't yet tried "MinGW Makefiles" but from
my ancient (MSYS/Wine where MSYS is the predecessor of MSYS2)
experience for that generator you have to be sure that sh.exe is not
on your PATH (e.g., by renaming it) before it will work. (I have
never quite been sure why that was a requirement, but my guess was the
"mingw" make version acts differently if it detects sh.exe.) But
again from my ancient experience the rest of the Unix tools provided
by MSYS2 including bash.exe will likely work well with the "MinGW
Makefiles" generator.
I hope this (ancient direct and recent indirect) practical experience
with "Unix Makefiles", "MSYS Makefiles", "MinGW Makefiles", and
MinGW-w64 will be of some help to you.
Alan
__________________________
Alan W. Irwin
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.org); 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