ladybird/Ports/openrct2/patches/0004-Add-compile-options-to-CMakeLists.txt.patch
2024-03-25 14:11:26 +01:00

32 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julian=20Offenh=C3=A4user?= <offenhaeuser@protonmail.com>
Date: Wed, 8 Feb 2023 10:45:25 +0100
Subject: [PATCH] Add compile options to CMakeLists.txt
This irons out some compiler warnings that turned into errors when compiling a release build.
---
CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0f62a0bb62ebb1ea867898f3eb18e819d6a513ac..6a5da9dd95fb23f2063e79951b0df29032f9dcc0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -304,6 +304,8 @@ else ()
# unused-const-variable[=2] would check for unused values from headers as well
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_UNUSED_CONST_VARIABLE -Wunused-const-variable=1)
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WNO_CLOBBERED -Wno-clobbered)
+ ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WNO_MAYBE_UNINITIALIZED -Wno-maybe-uninitialized)
+ ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WNO_NULL_DEREFERENCE -Wno-null-dereference)
# Disabled due to problems compiling OpenSSL on macOS.
# ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_DOCUMENTATION -Wdocumentation)
@@ -313,7 +315,7 @@ else ()
ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls)
# Currently used MinGW w/GCC 7.2 doesn't provide sane error messages for this
- ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_NULL_DEREFERENCE -Wnull-dereference)
+ # ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_NULL_DEREFERENCE -Wnull-dereference)
endif ()
# These have no workarounds available when building with LTO
if (NOT IPO_BUILD_ENABLED)