[CMake] SONAME issue solved for Fortran shared libraries for
cmake-2.4.2
Brad King
brad.king at kitware.com
Fri Jul 28 17:22:04 EDT 2006
Alan W. Irwin wrote:
> 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).
Actually the bug goes deeper than this. The test for creating the
library with an soname is done on a per-language basis by looking for
one of the above variables, but the test for installing the library with
an soname is done using the ..._SONAME_C_FLAG variable. The install
test should be changed to use the target's linker language just like the
build test.
Please create a bug report here:
http://www.cmake.org/Bug
Thanks,
-Brad
More information about the CMake
mailing list