On 22. Oct, 2010, at 11:37 , Marco Atzeri wrote: > --- Ven 22/10/10, Michael Wild ha scritto: > >> >> On 22. Oct, 2010, at 11:07 , Marco Atzeri wrote: >> >>> Dear developers, >>> the current cmake package for cygwin is unsuitable to >> build >>> cmake package as it defines WIN32. >>> Cygwin programs are unix-like ones while WIN32 is >> needed only >>> for pure windows programs. >>> Defining WIN32 breaks building normal unix programs. >>> >>> To build the last qhull package >>> http://cygwin.com/ml/cygwin-announce/2010-09/msg00015.html >>> I was obliged to use the cmake Ports version. >>> >>> http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/ports;a=tree;f=devel/cmake;hb=HEAD >>> >>> Using such package I was also able to build VTK, with >> very minor >>> change of the source. >>> http://www.vtk.org/pipermail/vtk-developers/2010-September/008590.html >>> >>> >>> As the first target of a cygwin package is to allow >> to >>> build other cygwin packages, the current package >>> does NOT satisfy this requirement. >>> >>> Regards >>> Marco >> >> 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. > > 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... > > 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. > >> >> Set to >> true when the target system is Windows and on cygwin. >> >> Michael > > > Marco My 2c. Michael -- There is always a well-known solution to every human problem -- neat, plausible, and wrong. H. L. Mencken
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
