On Fri, Oct 22, 2010 at 5:37 AM, Marco Atzeri <span dir="ltr"><<a href="mailto:marco_atzeri@yahoo.it">marco_atzeri@yahoo.it</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
--- Ven 22/10/10, Michael Wild ha scritto:<br>
<div><div></div><div class="h5"><br>
><br>
> On 22. Oct, 2010, at 11:07 , Marco Atzeri wrote:<br>
><br>
> > Dear developers,<br>
> > the current cmake package for cygwin is unsuitable to<br>
> build<br>
> > cmake package as it defines WIN32.<br>
> > Cygwin programs are unix-like ones while WIN32 is<br>
> needed only<br>
> > for pure windows programs.<br>
> > Defining WIN32 breaks building normal unix programs.<br>
> ><br>
> > To build the last qhull package<br>
> > <a href="http://cygwin.com/ml/cygwin-announce/2010-09/msg00015.html" target="_blank">http://cygwin.com/ml/cygwin-announce/2010-09/msg00015.html</a><br>
> > I was obliged to use the cmake Ports version.<br>
> ><br>
> > <a href="http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/ports;a=tree;f=devel/cmake;hb=HEAD" target="_blank">http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/ports;a=tree;f=devel/cmake;hb=HEAD</a><br>
> ><br>
> > Using such package I was also able to build VTK, with<br>
> very minor<br>
> > change of the source.<br>
> > <a href="http://www.vtk.org/pipermail/vtk-developers/2010-September/008590.html" target="_blank">http://www.vtk.org/pipermail/vtk-developers/2010-September/008590.html</a><br>
> ><br>
> ><br>
> > As the first target of a cygwin package is to allow<br>
> to<br>
> > build other cygwin packages, the current package<br>
> > does NOT satisfy this requirement.<br>
> ><br>
> > Regards<br>
> > Marco<br>
><br>
> That's why one should check for CYGWIN in the<br>
> CMakeLists.txt files. IMHO this is a user-error and not<br>
> CMake's fault. The doc clearly states about the WIN32<br>
> variable:<br>
><br>
> WIN32 True on windows<br>
> systems, including win64.<br>
<br>
</div></div>But for cygwin is WRONG. It should be false<br></blockquote><div><br></div><div><br></div><div>This depends on your perspective. Are you using cygwin to try to make a native Windows port of a Unix program, or are you simply trying to compile the Unix program as if it was still Unix (and thereby trap it in the cygwin environment)?</div>
<div><br></div><div>We have been used to people saying they want to build native Windows apps with cygwin... and that's why it is the way it is. Perhaps there would be less cygwin-angst in the cmake world if we had adopted the opposite perspective, but that's the way it's been.</div>
<div><br></div><div>If we change it now, it should be changed via a cmake policy so that it's easy to get both behaviors for a while...</div><div> </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
WIN32 in not defined when you compile for cygwin any<br>
package.<br>
It is defined if your target is non cygwin but a pure<br>
win32 program like mingw ones.<br>
Eg. Autoconf/Automake don't set WIN32.<br>
<br>
Checking for CYGWIN in the CMakeLists.txt<br>
oblige to modify upstream source for any package<br>
we want to port on cygwin. While not setting WIN32<br>
allow to use upstream source without change and building<br>
like any other Unix system.<br>
<div class="im"><br>
><br>
> Set to<br>
> true when the target system is Windows and on cygwin.<br>
><br>
> Michael<br>
<br>
<br>
</div>Marco<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>