Add CMake option to re-enable warnings in game build

This commit is contained in:
PJB3005
2026-02-24 15:40:26 +01:00
parent 750f9a044d
commit 32e83a26a1
+5 -1
View File
@@ -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)