diff options
author | Siarhei Fedartsou <siarhei.fedartsou@mapbox.com> | 2020-01-27 16:24:16 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-01-29 18:44:50 +0200 |
commit | e211b40a82eecafc2400079b38a4076bc743b9a2 (patch) | |
tree | 24d29e5fc2987e51184c9078e3df49d1810c56fd /CMakeLists.txt | |
parent | d7c8104decbbea8203bd79a95c0647bc4e1a2196 (diff) | |
download | qtlocation-mapboxgl-e211b40a82eecafc2400079b38a4076bc743b9a2.tar.gz |
[build] Add WITH_NO_RTTI CMake option to be able to build gl-native with RTTI if needed
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9afded1deb..2547cfd5ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ option(WITH_OSMESA "Use OSMesa headless backend" OFF) option(WITH_EGL "Use EGL backend" OFF) option(WITH_NODEJS "Download test dependencies like NPM and Node.js" ON) option(WITH_ERROR "Add -Werror flag to build (turns warnings into errors)" ON) +option(WITH_NO_RTTI "Disable RTTI" ON) if (WITH_ERROR) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") @@ -80,7 +81,9 @@ else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wno-variadic-macros -Wno-unknown-pragmas") endif() -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") +if(WITH_NO_RTTI) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") +endif() if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES ".*Clang") # -Wno-error=unused-command-line-argument is required due to https://llvm.org/bugs/show_bug.cgi?id=7798 |