summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2021-03-10 10:51:23 +0200
committerMarius Vlad <marius.vlad@collabora.com>2021-03-30 16:21:46 +0300
commit7916f25315b90c5f24038f94a71c28dc17c8ba45 (patch)
treee28416f54ed4af23d59534e62ec5ff6466cc715f
parente8ecf9862cf730edc4b034fbc05450b56e28617d (diff)
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 <marius.vlad@collabora.com> Change-Id: Ib7905cdfb9a6012c4a5306255779293f3ba38778
-rw-r--r--conf.d/cmake/config.cmake10
1 files changed, 10 insertions, 0 deletions
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