[CMake] cmake for cygwin
Tam Toucan
dr at tamtoucan.com
Fri Oct 22 11:47:20 EDT 2010
>Are you using cygwin to try to make a native Windows port of a Unix
program, or are you simply trying to compile the Unix program as if it
was still Unix (and thereby trap it in the cygwin environment)?
>
> We have been used to people saying they want to build native Windows
apps with cygwin... and that's why it is the way it is. Perhaps there
would be less cygwin-angst in the cmake world if we had adopted the
opposite perspective, but that's the way it's been.
>
> If we change it now, it should be changed via a cmake policy so that
it's easy to get both behaviors for a while...
Just to say that support for compiling cygwin for non-cygwin apps has
been removed. Previously the -mno-cygwin option did this and it defined
WIN32.
There is/was really no good reason to ever compile for cygwin and have
WIN32 defined (and in fact you'll probably get into bother if you do).
If code works for both cygwin and windows then if should check WIN32 or
cygwin being defined.
More information about the CMake
mailing list