!25525 [MS][LITE][Develop] support high version gcc

Merge pull request !25525 from sunsuodong/fix_high_version_gcc
This commit is contained in:
i-robot 2021-10-28 03:31:00 +00:00 committed by Gitee
commit 2c0bd4ac9b
2 changed files with 2 additions and 0 deletions

View File

@ -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))

View File

@ -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)