[cmake-developers] What is the difference between "Unix Makefiles" and "MSYS Makefiles" on MSYS2?

Brad King brad.king at kitware.com
Mon Jul 27 16:26:11 EDT 2015


On 07/27/2015 03:07 PM, Alan W. Irwin wrote:
> I got no response on the CMake list to the question below so I thought
> I had better ask instead the CMake developers here just what are the
> actual differences (if any) between the "Unix Makefiles" and "MSYS
> Makefiles" generators?
> 
> The point is that if both openwalnut builds on MSYS2 succeed with
> "Unix Makefiles" and allegro builds on MSYS2 succeed with "MSYS
> Makefiles", then the differences between the two generators might be
> minimal/unimportant so I could just recommend to PLplot users that
> they can use either generator on MSYS2.  But I would appreciate your
> comments on that possibility before I made such a recommendation.

Looking at the source for the "MSYS Makefiles" generator the
differences are:

- Defines "MSYS" variable to "1" for use by CMake project code.
- Selects "gcc", "g++", and "windres" as the default compilers
  for C, CXX, and RC languages (instead of just "cc" and "c++").
- When writing commands to the makefiles to be executed in the
  shell, explicitly converts "c:/path" to "/c/path" in a few cases.

I'm not particularly familiar with MSYS2 so I can't say off the
top of my head which generator is best for it.  If "Unix Makefiles"
works well I don't think there is a reason not to use it.

-Brad


More information about the cmake-developers mailing list