cmake: remove a specific warning for clang

This commit is contained in:
Gregory Hainaut 2014-07-12 16:04:57 +02:00
parent 7318814474
commit 8c03d50421
1 changed files with 11 additions and 0 deletions

View File

@ -49,6 +49,11 @@ if(PACKAGE_MODE)
add_definitions(-DPLUGIN_DIR_COMPILATION=${PLUGIN_DIR} -DGAMEINDEX_DIR_COMPILATION=${GAMEINDEX_DIR})
endif(PACKAGE_MODE)
#-------------------------------------------------------------------------------
# Compiler extra
#-------------------------------------------------------------------------------
option(USE_CLANG "Use llvm/clang to build PCSX2 (developer option)")
#-------------------------------------------------------------------------------
# Select the architecture
#-------------------------------------------------------------------------------
@ -184,9 +189,15 @@ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
# -Wno-missing-field-initializers: standard allow to init only the begin of struct/array in static init. Just a silly warning.
# -Wno-unused-function: warn for function not used in release build
# -Wno-unused-variable: just annoying to manage different level of logging, a couple of extra var won't kill any serious compiler.
# -Wno-deprecated-register: glib issue...
set(DEFAULT_WARNINGS "-Wall -Wno-attributes -Wstrict-aliasing -Wno-missing-field-initializers -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable")
if (USE_CLANG)
set(DEFAULT_WARNINGS "${DEFAULT_WARNINGS} -Wno-deprecated-register")
endif()
set(HARDENING_FLAG "-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security")
set(COMMON_FLAG "-pipe -std=c++0x -fvisibility=hidden -pthread")
if(CMAKE_BUILD_TYPE MATCHES "Debug|Devel")
set(DEBUG_FLAG "-g")
else()