[gmx-developers] Re: help needed: static builds with cmake
Szilárd Páll
szilard.pall at cbr.su.se
Fri Oct 29 19:03:36 CEST 2010
> 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.
OK, in that case it's safe to re-enable it for cygwin.
CMAKE_STATIC_LIBRARY_SUFFIX is a priority and tells find_library in
which order to search for libraries.
> 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 ";".
No idea, I can't find anything like that in the CMakeLists. This
sounds quite annoying and would be simple to fix it by not calling
find_package(MPI) at all if CC=mpicc (or alternatively, if some things
that the find_package sets are needed, we could discard some stuff
manually as well). However, as can't test it and I am not completely
sure it won't brake something, I won't risk fixing this just before
the release.
Are we sure such a test does the job, i.e. if CC=mpicc no other
MPI-related stuff provided by the find_package(MPI) is necessary? Can
anyone test/confirm this? I can create a patch in 5 min if there is...
Cheers,
--
Szilárd
More information about the gromacs.org_gmx-developers
mailing list