[CMake] cmake for cygwin

Marco Atzeri marco_atzeri at yahoo.it
Sun Oct 24 02:37:30 EDT 2010


--- Ven 22/10/10, Rolf Eike Beer  ha scritto:

> > This super-set is wrong. Cygwin belongs to Unix
> family
> 
> Exactly. And guess what: "IF (UNIX)" would also include
> Cygwin.
> 
> > I noticed. But Automake/autoconf makes it right, it
> > doesn't mix cygwin with win32 programs.
> 
> Well, you did not ask right ;)
> 
> IF (UNIX)
>   foo
> ENDIF()
> 
> -> Cygwin would say foo
> 
> IF (WIN32)
>  foo
> ENDIF ()
> 
> -> Cygwin would say foo
> 
> IF (CYGWIN)
>  foo
> ENDIF ()
> 
> -> well, you guess it
> 
> So this is only different from what other build tools or
> whatever do. But
> it is well known behaviour, it is documented, and it can't
> be changed for
> backward compatibility anyway.

It should be changed. That will be the cleanest way for porting and
most of the time we will not need any IF (CYGWIN) to complete our job 
as package maintainer.

Othewise we should patch any sources to replace IF (WIN32) with
IF(WIN32 AND NOT CYGWIN) and these means that this wrong policy 
is forcing unneeded workload on our backs.

Also cmake and vtk sources are full of IF(WIN32 AND NOT CYGWIN)
because WIN32 and CYGWIN are in strong contrast.

> 
> >> > 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.
> 
> Ehm, if the upstream writes a CMakeLists.txt it should
> write a valid one.
> 
> > 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)
> 
> Those are bugs, report them.

For me and almost all the other cygwin package maintainers, it 
is a wrong behaviour of cmake so I am reporting here.
(Bill of course could disagree, but its only cygwin package is cmake)

> 
> Eike

Marco Atzeri



      


More information about the CMake mailing list