From: Marius Vlad Date: Wed, 10 Mar 2021 08:51:23 +0000 (+0200) Subject: conf.d/cmake/config.cmake: Fail on warnings X-Git-Tag: 11.91.0~1 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=apps%2Fagl-service-homescreen.git;a=commitdiff_plain;h=93496db04da524dfafa6e80c8d865cf53db81cf3 conf.d/cmake/config.cmake: Fail on warnings Fail the compilation on warnings, so we avoid silly mistakes like found in SPEC-3843. Bug-AGL: SPEC-3843 Signed-off-by: Marius Vlad Change-Id: Ib7905cdfb9a6012c4a5306255779293f3ba38778 --- diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake index ee0bb05..b0c9ce6 100644 --- a/conf.d/cmake/config.cmake +++ b/conf.d/cmake/config.cmake @@ -87,6 +87,16 @@ list (APPEND link_libraries -pthread) # Either separate options with ";", or each options must be quoted separately # DO NOT PUT ALL OPTION QUOTED AT ONCE , COMPILATION COULD FAILED ! # ---------------------------------------------------------------------------- +set(COMPILE_OPTIONS + -Wall + -Wextra + -Werror + -Wno-cpp + -Wno-missing-field-initializers + -fstack-protector-all + -Wl,-z,relro,-z,now + CACHE STRING "Compilation flags" +) #set(COMPILE_OPTIONS # -Wall # -Wextra