diff --git a/cmake/external_libs/libevent.cmake b/cmake/external_libs/libevent.cmake deleted file mode 100644 index d652cf44aac54d9e1f60ba7836ad5ab2b6b678b4..0000000000000000000000000000000000000000 --- a/cmake/external_libs/libevent.cmake +++ /dev/null @@ -1,36 +0,0 @@ -set(openssl_USE_STATIC_LIBS ON) -set(libevent_CFLAGS "-fPIC -fvisibility=hidden -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2") -if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") - set(libevent_LDFLAGS "-Wl,-z,now") -endif() - -if(NOT MINDSPORE_PROJECT_DIR) -set(MINDSPORE_PROJECT_DIR ${CMAKE_SOURCE_DIR}) -endif() - -if(ENABLE_GITEE OR ENABLE_GITEE_EULER) # Channel GITEE_EULER is NOT supported now, use GITEE instead. - set(REQ_URL "https://gitee.com/mirrors/libevent/repository/archive/release-2.1.12-stable.tar.gz") - set(SHA256 "7180a979aaa7000e1264da484f712d403fcf7679b1e9212c4e3d09f5c93efc24") -else() - set(REQ_URL - "https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz") - set(SHA256 "92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb") -endif() - -message("libevent using openssl stub dir: " ${openssl_ROOT}) - -mindspore_add_pkg(libevent - VER 2.1.12 - LIBS event event_pthreads event_core event_openssl - URL ${REQ_URL} - SHA256 ${SHA256} - PATCHES ${MINDSPORE_PROJECT_DIR}/third_party/patch/libevent/libevent.patch001 - CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTING=OFF -DOPENSSL_ROOT_DIR:PATH=${openssl_ROOT} - -DEVENT__LIBRARY_TYPE:STRING=STATIC) - -include_directories(${libevent_INC}) - -add_library(mindspore::event ALIAS libevent::event) -add_library(mindspore::event_pthreads ALIAS libevent::event_pthreads) -add_library(mindspore::event_core ALIAS libevent::event_core) -add_library(mindspore::event_openssl ALIAS libevent::event_openssl) diff --git a/mindspore-lite/CMakeLists.txt b/mindspore-lite/CMakeLists.txt index c497ee12a09a0839cfdf1cdab3d2a72e29f94e52..2c8748097d5c7bcf64b529503560b5c427d980c1 100644 --- a/mindspore-lite/CMakeLists.txt +++ b/mindspore-lite/CMakeLists.txt @@ -948,7 +948,6 @@ endif() if(MSLITE_ENABLE_CLOUD_FUSION_INFERENCE OR MSLITE_ENABLE_CLOUD_INFERENCE) if(NOT MSLITE_TARGET_SITEAI) set(MSLITE_DEPS_MKLDNN on) - set(MSLITE_DEPS_LIBEVENT on) set(MSLITE_DEPS_PYBIND11 on) endif() if(SUPPORT_TENSORRT) diff --git a/mindspore-lite/cmake/ccsrc_module.cmake b/mindspore-lite/cmake/ccsrc_module.cmake index 6283cf57f36c320dbef8169df72d2d7645403025..895774a179fa2388c7611bae9618e57d87589e62 100644 --- a/mindspore-lite/cmake/ccsrc_module.cmake +++ b/mindspore-lite/cmake/ccsrc_module.cmake @@ -34,4 +34,3 @@ if(Python3_FOUND) include(${TOP_DIR}/cmake/external_libs/pybind11.cmake) endif() endif() -include(${TOP_DIR}/cmake/external_libs/libevent.cmake) diff --git a/mindspore-lite/cmake/lite_dependences.cmake b/mindspore-lite/cmake/lite_dependences.cmake index 295a51cd781fd3234c2722e2f967b45e80cc3cb8..0ea3d486dbc2d573ba7e7ec417bb0ab87dd3d226 100644 --- a/mindspore-lite/cmake/lite_dependences.cmake +++ b/mindspore-lite/cmake/lite_dependences.cmake @@ -49,9 +49,6 @@ if(MSLITE_DEPS_MKLDNN) include(${TOP_DIR}/cmake/external_libs/mkl_dnn.cmake) endif() -if(MSLITE_DEPS_LIBEVENT) - include(${TOP_DIR}/cmake/external_libs/libevent.cmake) -endif() if(MSLITE_DEPS_PYBIND11) find_package(Python3 COMPONENTS Interpreter Development) diff --git a/mindspore-lite/providers/siteai/CMakeLists.txt b/mindspore-lite/providers/siteai/CMakeLists.txt index dccb9942a6eaa4f05c78935da7b2f6d1fb55a301..289851010e774fdca13457a668ddded6199766a2 100644 --- a/mindspore-lite/providers/siteai/CMakeLists.txt +++ b/mindspore-lite/providers/siteai/CMakeLists.txt @@ -5,7 +5,6 @@ project(SiteAi) set(MSLITE_DEPS_PYBIND11 on CACHE INTERNAL "setting MSLITE_DEPS_PYBIND11 value") set(MSLITE_DEPS_ROBIN_HOOD_HASHING off CACHE INTERNAL "setting MSLITE_DEPS_ROBIN_HOOD_HASHING value") set(MSLITE_DEPS_MKLDNN off CACHE INTERNAL "setting MSLITE_DEPS_MKLDNN value") -set(MSLITE_DEPS_LIBEVENT off CACHE INTERNAL "setting MSLITE_DEPS_LIBEVENT value") set(MSLITE_DEPS_OPENSSL off CACHE INTERNAL "setting MSLITE_DEPS_OPENSSL value") set(MSLITE_DEPS_CMSIS off CACHE INTERNAL "setting MSLITE_DEPS_CMSIS value") diff --git a/third_party/patch/libevent/libevent.patch001 b/third_party/patch/libevent/libevent.patch001 deleted file mode 100644 index ad8a3105de9cf3f0f41e5cbffc463ee3a9d4d355..0000000000000000000000000000000000000000 --- a/third_party/patch/libevent/libevent.patch001 +++ /dev/null @@ -1,17 +0,0 @@ -diff -Npur libevent/CMakeLists.txt libevent-modify/CMakeLists.txt ---- libevent/CMakeLists.txt 2020-07-05 20:02:46.000000000 +0800 -+++ libevent-modify/CMakeLists.txt 2021-04-19 16:36:57.982307500 +0800 -@@ -852,7 +852,7 @@ if (NOT EVENT__DISABLE_OPENSSL) - - list(APPEND SRC_OPENSSL bufferevent_openssl.c) - list(APPEND HDR_PUBLIC include/event2/bufferevent_ssl.h) -- list(APPEND LIB_APPS ${OPENSSL_LIBRARIES}) -+ list(APPEND LIB_APPS ${OPENSSL_LIBRARIES} -ldl) - endif() - - if (NOT EVENT__DISABLE_THREAD_SUPPORT) -diff -Npur libevent/cmake/AddEventLibrary.cmake libevent-modify/cmake/AddEventLibrary.cmake ---- libevent/cmake/AddEventLibrary.cmake 2020-07-05 20:02:46.000000000 +0800 -+++ libevent-modify/cmake/AddEventLibrary.cmake 2021-04-19 16:36:57.982307500 +0800 -@@ -153,1 +153,0 @@ -- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"