未验证 提交 813f17ba 编写于 作者: Y ysh329 提交者: GitHub

[cherry-pick] Fix abnormal exit for opencl build (#3917)

* [LITE][COMPILE] Fix clang compile slow for arm cpu and abnormal exit for opencl. test=develop (#3763)
上级 93277542
...@@ -71,6 +71,12 @@ if (LITE_ON_TINY_PUBLISH) ...@@ -71,6 +71,12 @@ if (LITE_ON_TINY_PUBLISH)
check_linker_flag(-Wl,--gc-sections) check_linker_flag(-Wl,--gc-sections)
endif() endif()
if(ARM_TARGET_LANG STREQUAL "clang")
# note(ysh329): fix slow compilation for arm cpu,
# and abnormal exit compilation for opencl due to lots of warning
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-return-type")
endif()
if(LITE_WITH_OPENMP) if(LITE_WITH_OPENMP)
find_package(OpenMP REQUIRED) find_package(OpenMP REQUIRED)
if(OPENMP_FOUND OR OpenMP_CXX_FOUND) if(OPENMP_FOUND OR OpenMP_CXX_FOUND)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册