diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-04-06 12:14:24 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-04-06 18:18:17 +0300 |
commit | c829ea7e9243319b802a0984b37dbda1ba1ae536 (patch) | |
tree | 53266e28525b39f58eed999cc4bda629db4346fe /CMakeLists.txt | |
parent | d0c103fa8f0bade2be56d50a745f16b4e9ed6b29 (diff) | |
download | qtlocation-mapboxgl-c829ea7e9243319b802a0984b37dbda1ba1ae536.tar.gz |
[build] Add option to disable -Werror
mkdir build && cd build && cmake .. -DMBGL_WITH_WERROR=OFF
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bd9bc75798..2fdd98a41a 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( $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Wall> $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Wshadow> $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Wextra> - $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>>:-Werror> + $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<PLATFORM_ID:Windows>>,$<BOOL:${MBGL_WITH_WERROR}>>:-Werror> $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<PLATFORM_ID:Android>>:-Wno-error=tautological-constant-compare> $<$<CXX_COMPILER_ID:GNU>:-Wno-error=maybe-uninitialized> $<$<CXX_COMPILER_ID:GNU>:-Wno-error=return-type> |