!33287 set symbols of openssl static library to hidden

Merge pull request !33287 from zhoufeng/fix-openssl-version-conflict
This commit is contained in:
i-robot 2022-04-20 06:06:32 +00:00 committed by Gitee
commit 0a4c536570
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 6 additions and 8 deletions

View File

@ -62,6 +62,7 @@ if(BUILD_LITE)
add_library(mindspore::crypto ALIAS openssl::crypto)
else()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR APPLE)
set(openssl_CFLAGS -fvisibility=hidden)
mindspore_add_pkg(openssl
VER 1.1.1k
LIBS ssl crypto

View File

@ -367,9 +367,10 @@ if(ENABLE_GPU)
${CUDA_PATH}/lib64/libcusolver.so
${CUDA_PATH}/lib64/libcufft.so
${CUDA_PATH}/lib64/libcusparse.so)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries(mindspore_backend PRIVATE mindspore::crypto mindspore::ssl)
endif()
endif()
if(NOT WIN32)
target_link_libraries(mindspore_backend PRIVATE mindspore::crypto mindspore::ssl)
endif()
if(ENABLE_DEBUGGER)
@ -536,10 +537,6 @@ if(USE_GLOG)
target_link_libraries(_c_expression PRIVATE mindspore::glog)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries(mindspore PUBLIC mindspore::crypto mindspore::ssl)
endif()
if(ENABLE_GPU)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries(_c_expression PRIVATE mindspore::crypto mindspore::ssl)

View File

@ -268,7 +268,7 @@ endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
target_link_libraries(ut_tests PRIVATE mindspore::gtest mindspore::event mindspore::event_pthreads
mindspore::event_openssl ${PYTHON_LIBRARIES} pthread util dl)
mindspore::event_openssl mindspore::ssl mindspore::crypto ${PYTHON_LIBRARIES} pthread util dl)
if(ENABLE_MINDDATA)
target_link_libraries(ut_tests PRIVATE mindspore::sqlite mindspore::jpeg_turbo mindspore::turbojpeg
mindspore::opencv_core mindspore::opencv_imgcodecs mindspore::opencv_imgproc mindspore::tinyxml2