[cmake-developers] [PATCH] CMakeDetermineSystem.cmake distinguishes-MSYS-MINGW32 (was Re: Distinguishing MSYS2

Brad King brad.king at kitware.com
Mon Aug 10 09:45:48 EDT 2015


On 08/07/2015 09:47 PM, Greg Jung wrote:
> Here is a patch that incorporates mingw/msys run via "MSYS Makefiles"
> generator to obtain the system name via "uname -s".  

Thanks.  Is this meant for use when running on MSYS2?  Is
"#if defined(__MSYS__)" the official preprocessing condition for
targeting the MSYS2 runtime platform?

We need to distinguish between the original "MSYS" and "MSYS2" for
purposes of this discussion.  IIUC MSYS2 is a full environment
like Cygwin.  In the "Distinguishing MSYS2" thread we established
that CMake should be built for running under MSYS2 and link to
the msys-2.0.dll runtime in order to generate build systems for
MSYS2 targets.  In this case there should be no "MinGW Makefiles"
or "MSYS Makefiles" generators.  It should just be "Unix Makefiles"
with CMAKE_SYSTEM_NAME set to "MSYS" (or "MSYS2"?).

The "MSYS Makefiles" generator should remain unaware of MSYS2
as distinct from the original MSYS.  In both cases one is using
MinGW tools to build native Windows binaries.  This generator
should be available only when CMake is built to host natively
on Windows.  CMAKE_SYSTEM_NAME should still be "Windows".  It
just happens to generate for the MSYS make tool.

-Brad



More information about the cmake-developers mailing list