Problem 2331

Summary: Add optional soversion
Product: Geant4 Reporter: Stephan Lachnit <stephan.lachnit>
Component: cmakeAssignee: Ben Morgan <Ben.Morgan>
Status: RESOLVED LATER    
Severity: enhancement    
Priority: P4    
Version: 10.7   
Hardware: All   
OS: Linux   

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.