leezu commented on a change in pull request #17815: [WIP] Add SOVERSION when
build shared libmxnet.so library
URL: https://github.com/apache/incubator-mxnet/pull/17815#discussion_r394069335
##########
File path: CMakeLists.txt
##########
@@ -704,6 +712,8 @@ if(UNIX)
target_link_libraries(mxnet PRIVATE mxnet_static)
target_link_libraries(mxnet_static PUBLIC ${CMAKE_DL_LIBS})
set_target_properties(mxnet_static PROPERTIES OUTPUT_NAME mxnet)
+ set_target_properties(mxnet PROPERTIES VERSION
"${ver_major}.${ver_minor}.${ver_patch}")
Review comment:
https://cmake.org/cmake/help/latest/prop_tgt/VERSION.html does not say
anything about the target property being initialized from the project version.
So it should still be needed. But you can try it out locally: Don's set the
target property but print it. I expect it would print an empty value.
Instead of using `ver_major` you can use
https://cmake.org/cmake/help/latest/variable/PROJECT_VERSION_MAJOR.html#variable:PROJECT_VERSION_MAJOR
etc
for clarity
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services