diff --git a/CMakeLists.txt b/CMakeLists.txt index bd9bc7579..2fdd98a41 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>