mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-11 22:34:53 +08:00
[cmake] add HAVE_SOVERSION option (default=OFF). (#37502)
Summary:
This is useful for linux distributions when the ABI/API of libtorch has
been changed. The default SOVERSION is set to
"${TORCH_VERSION_MAJOR}.${TORCH_VERSION_MINOR}".
ezyang
But if the release strategy of pytorch/caffe2 involves avoiding breaking API/ABI changes to libtorch for minor/patch releases, then we can set `TORCH_SOVERSION` to simply `TORCH_VERSION_MAJOR`. Please confirm that.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37502
Differential Revision: D21303565
Pulled By: ezyang
fbshipit-source-id: 798f5ec7fc5f0431ff1a7f9e8e5d3a0d3b25bb22
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4c8636c74c
commit
69e2f1aaff
@ -23,6 +23,10 @@ else()
|
||||
endif()
|
||||
|
||||
add_library(shm SHARED core.cpp)
|
||||
if(HAVE_SOVERSION)
|
||||
set_target_properties(shm PROPERTIES
|
||||
VERSION ${TORCH_VERSION} SOVERSION ${TORCH_SOVERSION})
|
||||
endif()
|
||||
|
||||
target_include_directories(shm PUBLIC
|
||||
${CMAKE_BINARY_DIR}/aten/src # provides "ATen/TypeExtendedInterface.h" to ATen.h
|
||||
|
||||
Reference in New Issue
Block a user