diff --git a/mindspore/core/CMakeLists.txt b/mindspore/core/CMakeLists.txt index 9dcebb21a3b..1ad522bda9e 100644 --- a/mindspore/core/CMakeLists.txt +++ b/mindspore/core/CMakeLists.txt @@ -46,6 +46,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") endif() set_property(SOURCE ${CORE_SRC_LIST} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_CORE) +set_property(SOURCE ${PROTO_SRCS} PROPERTY COMPILE_OPTIONS -Wno-array-bounds) add_library(mindspore_core STATIC ${CORE_SRC_LIST} ${PROTO_SRCS}) target_link_libraries(mindspore_core PRIVATE mindspore_gvar) if(NOT(BUILD_LITE)) diff --git a/mindspore/lite/micro/coder/CMakeLists.txt b/mindspore/lite/micro/coder/CMakeLists.txt index 79358279709..24542d1bf6a 100644 --- a/mindspore/lite/micro/coder/CMakeLists.txt +++ b/mindspore/lite/micro/coder/CMakeLists.txt @@ -28,6 +28,7 @@ endif() if(MSLITE_ENABLE_CONVERTER) include(${MICRO_DIR}/cmake/file_list.cmake) + set_property(SOURCE ${FILE_SET} PROPERTY COMPILE_OPTIONS -Wno-error=stringop-overflow=) add_executable(codegen main.cc ${FILE_SET}) add_dependencies(codegen fbs_src) add_dependencies(codegen fbs_inner_src)