(CMake) customisable version/soversion #4121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the CMake configuration, the
libcaffe.sosoname, derived from theCAFFE_TARGET_SOVERSIONvariable here, contains the0-rc3patch/revision information.AFAIK this is against the general convention (described here and other places), and has caused me a few issues, e.g. with CMake (when creating the symlink-chain through
cmake build . --target install) and Bazel (when including Caffe as a pre-built external project) both of which prefer the more canonical soname form:lib{name}.so.{number}.This complicates the scenario when I want to maintain multiple versions of Caffe on the same machine, as shared libraries. Rather than changing the soname itself, I suggest the relevant variable is made customisable at the command line, which regardless I think is more generally useful.