[CMake] cmake for cygwin

Marco Atzeri marco_atzeri at yahoo.it
Fri Oct 22 09:04:12 EDT 2010


--- Ven 22/10/10, Michael Wild  ha scritto:


> >> 
> >> That's why one should check for CYGWIN in the
> >> CMakeLists.txt files. IMHO this is a user-error
> and not
> >> CMake's fault. The doc clearly states about the
> WIN32
> >> variable:
> >> 
> >>        WIN32  True on
> windows
> >> systems, including win64.
> > 
> > But for cygwin is WRONG. It should be false
> 
> One could also argue that cygwin is running under WIN32. A
> matter of convention.

Sorry again, but you are wrong. 
It is not a convention, Cygwin is a unix platform. 
Cygwin programs don't work as usual win32 programs

> 
> > 
> > WIN32 in not defined when you compile for cygwin any 
> > package.
> > It is defined if your target is non cygwin but a pure
> > win32 program like mingw ones.
> > Eg. Autoconf/Automake don't set WIN32.
> 
> WIN32 is the super-set of pure Windows, CYGWIN and
> MSYS/MINGW. And in case you haven't noticed: CMake is not a
> Autoconf clone...

This super-set is wrong. Cygwin belongs to Unix family

I noticed. But Automake/autoconf makes it right, it 
doesn't mix cygwin with win32 programs.

> > Checking for CYGWIN in the CMakeLists.txt
> > oblige to modify upstream source for any package
> > we want to port on cygwin. While not setting WIN32
> > allow to use upstream source without change and
> building
> > like any other Unix system.
> 
> Not checking for CYGWIN is an error in the upstream package
> and should be reported there or patched by you.

This is absurd.
The upstream could ignore CYGWIN, but I as package maintainer
I should not patch every single package when NOT setting
WIN32 allow me to build from the source of the shelf.

To build qhull (http://www.qhull.org/) 
I needed no cygwin specific patch, but only a cmake package 
with a RIGHT understanding of what Cygwin is: SET(WIN32 0)

Also VTK builds as true cygwin programs with SET(WIN32 0)

> 
> My 2c.
> 
> Michael
> 
 
Marco



      


More information about the CMake mailing list