From 022648b3ef19ed70b337b508a11e0eabddc58dcb Mon Sep 17 00:00:00 2001 From: zhengyuanhua Date: Sat, 21 Nov 2020 15:51:31 +0800 Subject: [PATCH] cmake add -Wno-deprecated-declarations --- ge/common/CMakeLists.txt | 2 ++ ge/common/ge_common.mk | 12 ++++++++---- ge/executor/CMakeLists.txt | 1 + ge/executor/module.mk | 8 ++++---- ge/offline/CMakeLists.txt | 1 + ge/offline/module.mk | 2 +- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ge/common/CMakeLists.txt b/ge/common/CMakeLists.txt index 14e9b6af..444f93a2 100755 --- a/ge/common/CMakeLists.txt +++ b/ge/common/CMakeLists.txt @@ -78,6 +78,7 @@ target_compile_options(ge_common PRIVATE -fvisibility=hidden -O2 -Werror + -Wno-deprecated-declarations ) target_include_directories(ge_common PRIVATE @@ -132,6 +133,7 @@ target_compile_options(ge_common_static PRIVATE -fvisibility=hidden -O2 -Werror + -Wno-deprecated-declarations ) target_include_directories(ge_common_static PRIVATE diff --git a/ge/common/ge_common.mk b/ge/common/ge_common.mk index 28536195..0e3fc972 100755 --- a/ge/common/ge_common.mk +++ b/ge/common/ge_common.mk @@ -82,8 +82,9 @@ include $(CLEAR_VARS) LOCAL_MODULE := libge_common -LOCAL_CFLAGS += -Werror -DFMK_SUPPORT_DUMP +LOCAL_CFLAGS += -Werror -DFMK_SUPPORT_DUMP -Wno-deprecated-declarations LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -O2 -Dgoogle=ascend_private + ifeq ($(DEBUG), 1) LOCAL_CFLAGS += -g -O0 else @@ -123,8 +124,9 @@ include $(CLEAR_VARS) LOCAL_MODULE := libge_common -LOCAL_CFLAGS += -Werror -DFMK_SUPPORT_DUMP +LOCAL_CFLAGS += -Werror -DFMK_SUPPORT_DUMP -Wno-deprecated-declarations LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -O2 -Dgoogle=ascend_private + ifeq ($(DEBUG), 1) LOCAL_CFLAGS += -g -O0 else @@ -169,8 +171,9 @@ include $(CLEAR_VARS) LOCAL_MODULE := libge_common -LOCAL_CFLAGS += -Werror -DFMK_SUPPORT_DUMP +LOCAL_CFLAGS += -Werror -DFMK_SUPPORT_DUMP -Wno-deprecated-declarations LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -O2 -Dgoogle=ascend_private + ifeq ($(DEBUG), 1) LOCAL_CFLAGS += -g -O0 endif @@ -211,8 +214,9 @@ include $(CLEAR_VARS) LOCAL_MODULE := libge_common -LOCAL_CFLAGS += -Werror -DFMK_SUPPORT_DUMP +LOCAL_CFLAGS += -Werror -DFMK_SUPPORT_DUMP -Wno-deprecated-declarations LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -O2 -Dgoogle=ascend_private + ifeq ($(DEBUG), 1) LOCAL_CFLAGS += -g -O0 endif diff --git a/ge/executor/CMakeLists.txt b/ge/executor/CMakeLists.txt index f7ad8eb7..670e1946 100644 --- a/ge/executor/CMakeLists.txt +++ b/ge/executor/CMakeLists.txt @@ -81,6 +81,7 @@ add_library(ge_executor STATIC ${SRC_LIST} ${PROTO_HDRS}) target_compile_options(ge_executor PRIVATE -Werror -O2 + -Wno-deprecated-declarations ) target_compile_definitions(ge_executor PRIVATE diff --git a/ge/executor/module.mk b/ge/executor/module.mk index 26fff723..4a0188be 100644 --- a/ge/executor/module.mk +++ b/ge/executor/module.mk @@ -105,7 +105,7 @@ local_ge_executor_ldflags := -lrt -ldl \ include $(CLEAR_VARS) LOCAL_MODULE := libge_executor -LOCAL_CFLAGS += -Werror +LOCAL_CFLAGS += -Werror -Wno-deprecated-declarations LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -O2 -DDAVINCI_SUPPORT_PROFILING -Dgoogle=ascend_private LOCAL_SRC_FILES := $(local_ge_executor_src_files) @@ -131,7 +131,7 @@ include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := libge_executor -LOCAL_CFLAGS += -Werror +LOCAL_CFLAGS += -Werror -Wno-deprecated-declarations LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DDAVINCI_SUPPORT_PROFILING -Dgoogle=ascend_private ifeq ($(DEBUG), 1) LOCAL_CFLAGS += -g -O0 @@ -167,7 +167,7 @@ include $(BUILD_HOST_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := libge_executor -LOCAL_CFLAGS += -Werror +LOCAL_CFLAGS += -Werror -Wno-deprecated-declarations LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DDAVINCI_SUPPORT_PROFILING -Dgoogle=ascend_private ifeq ($(DEBUG), 1) LOCAL_CFLAGS += -g -O0 @@ -200,7 +200,7 @@ include $(BUILD_HOST_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := libge_executor -LOCAL_CFLAGS += -Werror +LOCAL_CFLAGS += -Werror -Wno-deprecated-declarations LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DDAVINCI_SUPPORT_PROFILING -Dgoogle=ascend_private ifeq ($(DEBUG), 1) LOCAL_CFLAGS += -g -O0 diff --git a/ge/offline/CMakeLists.txt b/ge/offline/CMakeLists.txt index e6233634..e8e91327 100644 --- a/ge/offline/CMakeLists.txt +++ b/ge/offline/CMakeLists.txt @@ -20,6 +20,7 @@ add_executable(atc ${SRC_LIST} ${PROTO_HDRS}) target_compile_options(atc PRIVATE -Werror -O2 + -Wno-deprecated-declarations ) target_compile_definitions(atc PRIVATE diff --git a/ge/offline/module.mk b/ge/offline/module.mk index 56eb9a52..8859df29 100755 --- a/ge/offline/module.mk +++ b/ge/offline/module.mk @@ -5,7 +5,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := atc -LOCAL_CFLAGS += -Werror +LOCAL_CFLAGS += -Werror -Wno-deprecated-declarations LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 -DCOMPILE_OMG_PACKAGE -O2 -Dgoogle=ascend_private LOCAL_SRC_FILES := \