Problem 2331 - Add optional soversion
Summary: Add optional soversion
Status: RESOLVED LATER
Alias: None
Product: Geant4
Classification: Unclassified
Component: cmake (show other problems)
Version: 10.7
Hardware: All Linux
: P4 enhancement
Assignee: Ben Morgan
URL:
Depends on:
Blocks:
 
Reported: 2021-02-10 12:18 CET by Stephan Lachnit
Modified: 2022-07-13 15:45 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Stephan Lachnit 2021-02-10 12:18:34 CET
It would be nice to be able to have soversions for Geant4 libraries. This makes packaging easier, as it can trigger automatic rebuilds.
I understand that this is not wished by default. I propose a solution similar to what ROOT does:

* Add a new build option (something like GEANT4_USE_SOVERSIONS), disabled by default

* Add to cmake/Modules/G4DeveloperAPI.cmake in function __geant4_add_library:

if(GEANT4_USE_SOVERSIONS)
  set_target_properties(${_target_name} PROPERTIES
    VERSION ${${PROJECT_NAME}_VERSION}
    SOVERSION ${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR} )
endif()
Comment 1 Ben Morgan 2021-03-30 11:53:38 CEST
Sorry for the delay in getting to this. We'll look at adding this, but will see if a "true" SOVERSION can be determined using something like ABI Compliance Checker.