summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-01-29 17:42:38 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-01-29 18:44:50 +0200
commit5584fe26e1477bc2c7bd7187299abbb0923fc1d0 (patch)
tree6605e1704da068d9ae44a18fb6ce7b5556a58a33
parente211b40a82eecafc2400079b38a4076bc743b9a2 (diff)
downloadqtlocation-mapboxgl-5584fe26e1477bc2c7bd7187299abbb0923fc1d0.tar.gz
[build] Make it possible to enable RTTI on the new buildsystem
-rw-r--r--next/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/next/CMakeLists.txt b/next/CMakeLists.txt
index 1950a1144a..95b330992b 100644
--- a/next/CMakeLists.txt
+++ b/next/CMakeLists.txt
@@ -22,6 +22,7 @@ option(MBGL_WITH_CORE_ONLY "Build only the core bits, no platform code" OFF)
option(MBGL_WITH_COVERAGE "Enable code coverage collection" OFF)
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)
add_library(
mbgl-compiler-options INTERFACE
@@ -39,7 +40,7 @@ target_compile_options(
$<$<STREQUAL:${MBGL_WITH_SANITIZER},undefined>:-fsanitize=implicit-conversion>
$<$<STREQUAL:${MBGL_WITH_SANITIZER},undefined>:-fsanitize=undefined>
$<$<STREQUAL:${MBGL_WITH_SANITIZER},undefined>:-fsanitize=unsigned-integer-overflow>
- $<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
+ $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<NOT:$<BOOL:${MBGL_WITH_RTTI}>>>:-fno-rtti>
$<$<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>