[gmx-developers] Re: help needed: static builds with cmake

Roland Schulz roland at utk.edu
Fri Oct 29 18:50:45 CEST 2010

On Fri, Oct 29, 2010 at 12:11 PM, Szilárd Páll <szilard.pall at cbr.su.se>wrote:

> > Don't  know about HPUX. Cygwin should work too. And even MingW. If you
> > use CMAKE_STATIC_LIBRARY_SUFFIX which is lib for MingW. How about you
> just
> > disable the option if CMAKE_STATIC_LIBRARY_SUFFIX  is not set by Cmake?
> Doesn't Cygwin use dll-s and .lib-s? To be honest I don't remember
> anymore and unless someone can test it's better to be left off, isn't
> it?
> What does and empty CMAKE_STATIC_LIBRARY_SUFFIX mean? Also, the fact
> that CMake sets CMAKE_STATIC_LIBRARY_SUFFIX does not necessarily mean
> that I know what to prepend to the list to prioritize static libs;
> e.g. if CMAKE_STATIC_LIBRARY_SUFFIX contains " .sfoo .dbar" where on
> platform X -sfoo is static and -dbar is dynamic library. Now, if I
> just prepend ".a" it does not hurt much. However, I'd rather avoid
> doing that on a random X as it very likely that it's useless, and it
> might also pose a security risk to try to link against a ".a" on
> platform X (from galaxy Y :)...

No Cygwin uses .a and MingW uses .lib. And it is automatically correct if
you use  CMAKE_STATIC_LIBRARY_SUFFIX. I would understand
empty CMAKE_STATIC_LIBRARY_SUFFIX as meaning that Cmake doesn't know what
the correct suffix is. And I thought that the suffix can only have one
value. Having said that, feel free to leave it like it is. It covers the
important cases and shouldn't hurt in the others.

BTW: What about the issue with FindMPI and setting CC to mpicc? Do we add
this test whether the compiler is already mpicc and thus no libraries or
headers are needed to this release? Otherwise it isn't possible to compile
on Cray without the hack of setting the MPI settings to ";".


ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20101029/f3882203/attachment.html>

More information about the gromacs.org_gmx-developers mailing list