[CMake] Patch CMake for Mac static library creation
Belcourt, K. Noel
kbelco at sandia.gov
Fri Dec 3 20:07:48 EST 2010
Hi,
I'm on Mac OSX 10.5.8 with Intel 12.x compilers and CMake version
2.8.3. CMake doesn't seem to add the -c option to the ranlib command
to include common symbols into the library table of contents. Here's
the documentation for Apple's ranlib.
-c Include common symbols as definitions with respect
to the table of contents. This is seldom the intended behavior for
linking from a library, as it forces the linking of a
library member just because it uses an uninitialized global that is
undefined at that point in the linking. This option
is included only because this was the original behavior of ranlib.
This option is not the default.
This behavior is necessary if you have Fortran 90 modules that define
data but that don't contain any code (or contains code that isn't
called). Can -c be added by default when creating static Fortran
libraries on the Mac using ranlib?
Thanks.
-- Noel Belcourt
More information about the CMake
mailing list