From 4ddf64944fdb53a83006eed75fa3cf6ebf78605a Mon Sep 17 00:00:00 2001 From: gongdaguo Date: Mon, 6 Dec 2021 15:50:23 +0800 Subject: [PATCH] del glog patch --- cmake/external_libs/glog.cmake | 2 +- mindspore/lite/CMakeLists.txt | 1 - .../lite/cmake/check_requirements_lite.cmake | 13 ------ third_party/patch/glog/glog_lite.patch001 | 43 ------------------- 4 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 mindspore/lite/cmake/check_requirements_lite.cmake delete mode 100644 third_party/patch/glog/glog_lite.patch001 diff --git a/cmake/external_libs/glog.cmake b/cmake/external_libs/glog.cmake index 2d42afc5f72..cc019bf71a1 100644 --- a/cmake/external_libs/glog.cmake +++ b/cmake/external_libs/glog.cmake @@ -8,7 +8,7 @@ if(BUILD_LITE) set(glog_CFLAGS "-D_FORTIFY_SOURCE=2 -O2 ${SECURE_C_FLAGS}") set(glog_LDFLAGS "${SECURE_SHARED_LINKER_FLAGS}") endif() - set(glog_patch ${CMAKE_SOURCE_DIR}/../../third_party/patch/glog/glog_lite.patch001) + set(glog_patch "") set(glog_lib glog) else() set(glog_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2 ${SECURE_CXX_FLAGS} -Dgoogle=mindspore_private") diff --git a/mindspore/lite/CMakeLists.txt b/mindspore/lite/CMakeLists.txt index ee59106b93c..5d5faca3b6f 100644 --- a/mindspore/lite/CMakeLists.txt +++ b/mindspore/lite/CMakeLists.txt @@ -3,7 +3,6 @@ project(Lite) set(BUILD_LITE "on") -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/check_requirements_lite.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/secure_option.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/compile_link_option.cmake) diff --git a/mindspore/lite/cmake/check_requirements_lite.cmake b/mindspore/lite/cmake/check_requirements_lite.cmake deleted file mode 100644 index f98762254c7..00000000000 --- a/mindspore/lite/cmake/check_requirements_lite.cmake +++ /dev/null @@ -1,13 +0,0 @@ -## packages used both on windows and linux -if(DEFINED ENV{MS_PATCH_PATH}) - find_program(Patch_EXECUTABLE patch PATHS $ENV{MS_PATCH_PATH}) - set(Patch_FOUND ${Patch_EXECUTABLE}) -else() - find_package(Patch) -endif() -if(NOT Patch_FOUND) - message(FATAL_ERROR "Patch not found, " - "please set environment variable MS_PATCH_PATH to path where Patch is located, " - "usually found in GIT_PATH/usr/bin on Windows") -endif() -message(PATCH_EXECUTABLE = ${Patch_EXECUTABLE}) diff --git a/third_party/patch/glog/glog_lite.patch001 b/third_party/patch/glog/glog_lite.patch001 deleted file mode 100644 index bf260641e80..00000000000 --- a/third_party/patch/glog/glog_lite.patch001 +++ /dev/null @@ -1,43 +0,0 @@ -diff -Npur glog/CMakeLists.txt glog-patch/CMakeLists.txt ---- glog/CMakeLists.txt 2019-03-22 10:51:46.000000000 +0800 -+++ glog-patch/CMakeLists.txt 2021-04-01 10:32:25.753140500 +0800 -@@ -64,7 +64,6 @@ check_include_file (dlfcn.h HAVE_DLFCN_H - check_include_file (execinfo.h HAVE_EXECINFO_H) - check_include_file (glob.h HAVE_GLOB_H) - check_include_file (inttypes.h HAVE_INTTYPES_H) --check_include_file (libunwind.h HAVE_LIBUNWIND_H) - check_include_file (memory.h HAVE_MEMORY_H) - check_include_file (pwd.h HAVE_PWD_H) - check_include_file (stdint.h HAVE_STDINT_H) -@@ -80,7 +79,6 @@ check_include_file (syscall.h HAVE_SYSCA - check_include_file (syslog.h HAVE_SYSLOG_H) - check_include_file (ucontext.h HAVE_UCONTEXT_H) - check_include_file (unistd.h HAVE_UNISTD_H) --check_include_file (unwind.h HAVE_UNWIND_H) - check_include_file (pwd.h HAVE_PWD_H) - - check_include_file_cxx ("ext/hash_map" HAVE_EXT_HASH_MAP) -@@ -116,12 +114,8 @@ check_cxx_compiler_flag (-Wunnamed-type- - # snprintf as an inline function - check_symbol_exists (snprintf stdio.h HAVE_SNPRINTF) - --check_library_exists (unwind get_static_proc_name "" HAVE_LIB_UNWIND) - check_library_exists (dbghelp UnDecorateSymbolName "" HAVE_DBGHELP) - --find_library (UNWIND_LIBRARY NAMES unwind DOC "unwind library") --mark_as_advanced (UNWIND_LIBRARY) -- - check_c_source_compiles (" - #include - static void foo(void) __attribute__ ((unused)); -@@ -470,10 +464,6 @@ add_library (glog - add_library(glog::glog ALIAS glog) - - set_target_properties (glog PROPERTIES POSITION_INDEPENDENT_CODE ON) -- --if (UNWIND_LIBRARY) -- target_link_libraries (glog PUBLIC ${UNWIND_LIBRARY}) --endif (UNWIND_LIBRARY) - - if (HAVE_DBGHELP) - target_link_libraries (glog PUBLIC dbghelp)