From 32e83a26a1d9e3e37f4dc29a59283c00ccf202c2 Mon Sep 17 00:00:00 2001 From: PJB3005 Date: Tue, 24 Feb 2026 15:40:26 +0100 Subject: [PATCH] Add CMake option to re-enable warnings in game build --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b653f008f9..bbe0800273 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) add_subdirectory(extern/aurora EXCLUDE_FROM_ALL) +option(DUSK_BUILD_WARNINGS "If off, compiler warnings will be suppressed") + if (CMAKE_SYSTEM_NAME STREQUAL Linux) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-parameter") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -stdlib=libc++ -Wno-register -fPIC") @@ -28,7 +30,9 @@ elseif (MSVC) add_compile_options(/bigobj) add_compile_options(/Zc:strictStrings-) add_compile_options(/MP) - add_compile_options(/W0) + if (NOT DUSK_BUILD_WARNINGS) + add_compile_options(/W0) + endif () add_compile_options(/utf-8) endif () if (NOT MSVC)