From 423c49a809e7541e360faa154a92a44d60973f88 Mon Sep 17 00:00:00 2001 From: Martin Knecht Date: Sun, 22 Feb 2026 07:47:53 +0100 Subject: [PATCH] Add toggle for RTTI (#1564) When using the engine in combination with the JVM (Java virtual machine), you need RTTI. This patch adds an flag to enable the rtti --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca1b6071b..a34489d8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ option(WICKED_TESTS "Build WickedEngine tests" ON) option(WICKED_IMGUI_EXAMPLE "Build WickedEngine imgui example" ON) option(WICKED_ENABLE_IPO "Enable IPO/LTO in non-debug builds" NO) option(WICKED_EMBED_SHADERS "Embed shaders into the library" NO) +option(WICKED_ENABLE_RTTI "Enable RTTI" NO) if(UNIX) option(WICKED_ENABLE_ASAN "Enable AddressSanitizer in debug builds" OFF) option(WICKED_ENABLE_UBSAN "Enable UndefinedBehaviourSanitizer in debug builds" OFF) @@ -123,7 +124,7 @@ if (MSVC) /W3 # warning level 3 /MP # multi-processor compilation /EHsc- # exceptions disabled - /GR- # runtime type information disabled + $<$>,$>>:/GR-> # runtime type information disabled $<$:/GS-> # security check disabled in Release ) else() @@ -141,7 +142,7 @@ else() -Wno-sign-compare $<$:-fno-exceptions> # exceptions disabled - $<$,$>:-fno-rtti> # runtime type information disabled + $<$,$>,$>>:-fno-rtti> # runtime type information disabled # security checks disabled in Release: $<$:-fno-stack-protector>