From d03151bda28bf5394ffec92af6c352cc7659e999 Mon Sep 17 00:00:00 2001 From: Mingyu Chen Date: Fri, 14 Jan 2022 09:21:57 +0800 Subject: [PATCH] [chore](be) Add -Werror (#7744) All Warning will be treated as Error when compiling BE --- be/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index 2c3f5b7408..f8694275c9 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -336,8 +336,8 @@ check_function_exists(sched_getcpu HAVE_SCHED_GETCPU) # -pthread: enable multithreaded malloc # -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG: enable nanosecond precision for boost # -fno-omit-frame-pointers: Keep frame pointer for functions in register -set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wno-sign-compare -Wno-unknown-pragmas -pthread -Werror=strict-aliasing") -set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -fstrict-aliasing -fno-omit-frame-pointer -Werror=return-type") +set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wno-sign-compare -Wno-unknown-pragmas -pthread -Werror") +set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -fstrict-aliasing -fno-omit-frame-pointer") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -std=gnu++17 -D__STDC_FORMAT_MACROS") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-deprecated -Wno-vla") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG")