Brad King wrote:

If there is no interface version, there is no need for the soname to be
different from the real binary name.  IOW, we could just set VERSION=1.2
and no SOVERSION, and CMake will produce

libfoo.so -> libfoo.so.1.2  # link to help static linker -lfoo flags
libfoo.so.1.2               # real binary, soname = libfoo.so.1.2

Whenever a binary links to foo, it will copy the soname "libfoo.so.1.2".
The dynamic loader will search for that name at runtime and find the
real file.

should we hash out the above SOVERSION-only suggestion further?

That is for Boosters to decide, so I won't


Thanks for the explanation, we'll go w/o interface version only as you suggest.

The implementation does *not* set soversion on libraries of type MODULE,
 as the mac linker complains about -compatibility_version when making a
bundle.  Am I missing anything?

CMake's implementation to pass those flags does this:

  // Add OSX version flags, if any.
  if(this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
     this->Target->GetType() == cmTarget::MODULE_LIBRARY)

so it should work for SHARED and MODULE libraries equally.
Perhaps the boost CMake code is not setting SOVERSION.

Hmm. It isn't setting it on purpose... If I set either VERSION or SOVERSION on a module on the mac, I get:

Linking CXX shared module ../../../lib/mpi.so
cd /Users/troy/cmake/build/libs/mpi/src && /Users/troy/bin/cmake -E cmake_link_script CMakeFiles/mpi-mt-shared.dir/link.txt --verbose=1 /usr/bin/c++ -bundle -headerpad_max_install_names -Wl,-u,_munmap -Wl,-multiply_defined,suppress -compatibility_version 1.41.0 -o ../../../lib/mpi.1.41.0.so CMakeFiles/mpi-mt-shared.dir/python/collectives.cpp.o CMakeFiles/mpi-mt-shared.dir/python/py_communicator.cpp.o CMakeFiles/mpi-mt-shared.dir/python/datatypes.cpp.o CMakeFiles/mpi-mt-shared.dir/python/documentation.cpp.o CMakeFiles/mpi-mt-shared.dir/python/py_environment.cpp.o CMakeFiles/mpi-mt-shared.dir/python/py_nonblocking.cpp.o CMakeFiles/mpi-mt-shared.dir/python/py_exception.cpp.o CMakeFiles/mpi-mt-shared.dir/python/module.cpp.o CMakeFiles/mpi-mt-shared.dir/python/py_request.cpp.o CMakeFiles/mpi-mt-shared.dir/python/skeleton_and_content.cpp.o CMakeFiles/mpi-mt-shared.dir/python/status.cpp.o CMakeFiles/mpi-mt-shared.dir/python/py_timer.cpp.o -framework Python ../../../lib/libboost_python-mt.1.41.0.dylib -framework Python i686-apple-darwin9-g++-4.0.1: -compatibility_version only allowed with -dynamiclib

-t

_______________________________________________
Boost-cmake mailing list
Boost-cmake@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-cmake

Reply via email to