mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-08 20:24:47 -04:00
Add CMake option to re-enable warnings in game build
This commit is contained in:
+5
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user