[CMake] cmake for cygwin

Bill Hoffman bill.hoffman at kitware.com
Tue Oct 26 22:21:40 EDT 2010


On 10/26/2010 9:58 PM, Yaakov (Cygwin/X) wrote:
> On Tue, 2010-10-26 at 17:53 -0400, Bill Hoffman wrote:
>> Backwards compatibility may not be important to you, but to CMake it is
>> very important.  When a developer chooses to use CMake, I want to
>> respect that choice, and work as hard as I can to make sure I don't
>> break that code.   CMake has been doing this for 10 years on cygwin,
>> wrong or right that is how it has been done.   If there is code that
>> builds with CMake on cygwin today, your suggested change will break that
>> build.
>
> No, it will most likely *fix* it.
How is that possible?  If it is working today with the way CMake is for 
someone, and we make this change, it will stop working.  It can not 
*fix* something that is already working.  It can only break something 
that is already working, it can not fix something not broken...

>
> Bottom line: we insist that the CMake in the Cygwin distro not define
> WIN32.  If you're prepared to handle that upstream now, great.  If not,
> we will need to ship a patched version until this issue is rectified.
> How do you wish to proceed?
>
>
I guess you could release a patched cygwin that defaults to having the 
policy set to new, and I could release one that has the policy set to 
warn by default.

I suppose one other options is something like this:

"Warning: CMake has be forced to break backwards compatibility by the 
cygwin ports maintainers, we apologize if this broke your code. If your 
code does not compile, then set the cygwin policy to OLD, or add 
if(CYGWIN) set(WIN32 1) to your code."

We could emit that warning when cmake is run on cygwin for all projects 
until they require a new enough CMake that contains these changes by 
using the policy mechanism.

I would like to proceed by using the standard cmake policy mechanism. 
However, you have made it clear you will not be happy with that approach.

I am curious what you mean by "will need to ship a patched version until 
this issue is rectified."?  Will you block me from being the CMake 
maintainer for cygwin somehow?

Sorry this is becoming so difficult.  I seriously just care about the 
existing CMake users and don't want to break things for them.

-Bill


More information about the CMake mailing list