[CMake] SONAME issue solved for Fortran shared libraries for cmake-2.4.2

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Jul 28 17:06:37 EDT 2006


This patch needs to be applied to cmake-2.4.2 in order for Fortran shared
libraries (with SOVERSION and VERSION specified) to build and install properly
on Linux.

--- Modules/Platform/Linux.cmake_original   2006-07-04
18:16:42.000000000 -0700
+++ Modules/Platform/Linux.cmake    2006-07-28
13:13:45.000000000 -0700
@@ -7,4 +7,5 @@
  SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
  SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
  SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
+SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-soname,")
  INCLUDE(Platform/UnixPaths)

Without this patch, the build just creates the library with a name *.so,
e.g.,

bindings/f77/libplplotf77d.so

no symlinks are created, and the install has a missing file error (it
expects to find bindings/f77/libplplotf77d.so.9.1.0 which doesn't exist
without the patch).

With this patch everything works.  The build creates

software at chickadee> ls -l bindings/f77/libplplotf77d*
lrwxrwxrwx  1 software software    18 Jul 28 13:25 bindings/f77/libplplotf77d.so -> libplplotf77d.so.9*
lrwxrwxrwx  1 software software    22 Jul 28 13:25 bindings/f77/libplplotf77d.so.9 -> libplplotf77d.so.9.1.0*
-rwxr-xr-x  1 software software 19358 Jul 28 13:25 bindings/f77/libplplotf77d.so.9.1.0*

and the install works as well.  It's possible this patch has already been
applied to the cvs version of Cmake (I cannot find the location where you
can view the cvs source), but if not, please do so.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list