[CMake] cmake for cygwin

Marco Atzeri marco_atzeri at yahoo.it
Mon Oct 25 02:27:48 EDT 2010


--- Lun 25/10/10, Hendrik Sattler  ha scritto:

> Am Montag 25 Oktober 2010, 05:44:27
> schrieb Yaakov (Cygwin/X):
> > On Sun, 2010-10-24 at 10:12 +0200, Hendrik Sattler
> wrote:
> > > And: believe it or not, WIN32 and CYGWIN are
> _not_ in strong contrast.
> > > They've got so much in common, starting from the
> binary file format to
> > > all low level stuff that cygwin is never going to
> change. Live with it.
> > 
> > The "low-level stuff" -- IOW the usage of PE binaries
> -- is about *all*
> > Cygwin has in common with Win32.  Everything
> above that, including the
> 
> No. You have the same kernel under the skin and any
> software that has low-
> level parts thus needs to know that it is running on
> Windows, be it through 
> the cygwin layer or not. How does it do that without the
> WIN32 define?

this type of package are less than 1% of total. All the others 
pass through the cygwin layer.

The vast majority of packages ignore cygwin and built
fine following the IF(LINUX) conditionals,
bur if there are also IF(WIN32) conditionals we arrive 
with a deathly mix of unix and win32 characteristics.

This make the porting job a tiring job, and it is the main reason
why very few cmake built package are inside the cygwin distribution.
I hit this problem for every package I tried and the easy solution
is to use a cmake that don't set WIN32, than the porting is 
almost a piece of cake.
I built also VTK as truly cygwin package in this way.

> 
> > usage of *NIX/X11 vs Win32/GDI APIs is different, and
> that represents
> > the bulk of IF(WIN32) usage.
> 
> And for the cases it doesn't? You don't throw away
> compatibility for "the bulk 
> of ...".

This compatibility is a great damage to our efforts to include
whatever package in the cygwin distributin.

Eventually you could add a cygwin-legacy mode to mantain the 
current WRONG (for us cygwin mantainers) WIN32 setting.

> 
> HS

Marco



      


More information about the CMake mailing list