Skip to content

Commit

Permalink
Add a SONAME to shared libraries
Browse files Browse the repository at this point in the history
Ginkgo is written in C++ and does not guarantee any stable ABI.
Consequently, all shared libraries should be annotated by an appropriate
SONAME (this patch simply uses the release version). This ensures
conformity with best practices and library requirements for popular
Linux distributions (e.g., Debian/Ubuntu). It also prevents silent
breakage (at dynamic link time / run time) when the library ABI changed
and user code should have been recompiled.
  • Loading branch information
tamiko committed May 20, 2020
1 parent fd146da commit aeaee15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/build_helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ function(ginkgo_compile_features name)
if(GINKGO_WITH_IWYU AND GINKGO_IWYU_PATH)
set_property(TARGET "${name}" PROPERTY CXX_INCLUDE_WHAT_YOU_USE ${GINKGO_IWYU_PATH})
endif()
# Set an appropriate SONAME
set_property(TARGET "${name}" PROPERTY
SOVERSION "${Ginkgo_VERSION}")
if(GINKGO_CHANGED_SHARED_LIBRARY)
# Put all shared libraries and corresponding imported libraries into the specified path
set_property(TARGET "${name}" PROPERTY
Expand Down

0 comments on commit aeaee15

Please sign in to comment.