From 3ca4f80c8aae039136d6c1cf8f9bf87e76c121fb Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Mon, 6 Apr 2020 12:14:24 +0300 Subject: [build] Add option to disable -Werror mkdir build && cd build && cmake .. -DMBGL_WITH_WERROR=OFF --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4357493cef..cfee9d8458 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,7 @@ option(MBGL_WITH_QT "Build Mapbox GL Qt bindings" OFF) option(MBGL_WITH_SANITIZER "Use [address|thread|undefined] here" OFF) option(MBGL_WITH_RTTI "Compile with runtime type information" OFF) option(MBGL_WITH_OPENGL "Build with OpenGL renderer" ON) +option(MBGL_WITH_WERROR "Make all compilation warnings errors" ON) add_library( mbgl-compiler-options INTERFACE @@ -42,7 +43,7 @@ target_compile_options( $<$,$>>:-Wall> $<$,$>>:-Wshadow> $<$,$>>:-Wextra> - $<$,$>>:-Werror> + $<$,$>,$>:-Werror> $<$,$>:-Wno-error=tautological-constant-compare> $<$:-Wno-error=maybe-uninitialized> $<$:-Wno-error=return-type> -- cgit v1.2.1