From a6b9d771aaeeea2753352cebb279f1c88f569d0f Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 12 May 2022 20:23:33 +0200 Subject: [PATCH] Do not treat warning "'this' pointer is null" appearing with GCC 12 as error It is about code included from libclang and likely wrong so let's just not abort the compilation due to it. --- generator/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt index b2eef79..516fe99 100644 --- a/generator/CMakeLists.txt +++ b/generator/CMakeLists.txt @@ -60,6 +60,9 @@ endif () # also add reflective_rapidjson which is header-only but might pull additional include dirs for RapidJSON list(APPEND PRIVATE_LIBRARIES "${REFLECTIVE_RAPIDJSON_TARGET_NAME}") +# avoid warning "'this' pointer is null" from GCC 12 about code included from libclang +list(APPEND META_PRIVATE_COMPILE_OPTIONS "-Wno-error=nonnull") + # include modules to apply configuration include(BasicConfig) include(WindowsResources)