From a03619d03a9ca6605c8ea1d3638c2b10c954edf9 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 16 Dec 2017 19:11:56 -0800 Subject: Fixed Android warnings --- RenderScript/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'RenderScript') diff --git a/RenderScript/CMakeLists.txt b/RenderScript/CMakeLists.txt index df7b3fe..aef4334 100644 --- a/RenderScript/CMakeLists.txt +++ b/RenderScript/CMakeLists.txt @@ -71,6 +71,13 @@ PUBLIC include ) +if(PLATFORM_ANDROID) + # Suppress warnings from applying the ‘offsetof’ macro to a non-POD type + # warning: offset of on non-standard-layout type [-Winvalid-offsetof] + # This is OK because the warning is generated for simple structs (such as TextureDesc) + # that fail to be a POD type only by virtue of having a constructor and comparison operator + target_compile_options(RenderScript PRIVATE -Wno-invalid-offsetof) +endif() source_group("source" FILES ${SOURCE}) source_group("include" FILES ${INCLUDE}) -- cgit v1.2.3