Eliminate warnings for CMake builds

o All warnings which are not due to cling in 3.5
o Unused local typedefs in 3.6 (in 35 the switch is missing)
This commit is contained in:
Danilo Piparo 2015-03-21 12:52:02 +01:00 committed by sftnight
parent 3136974871
commit 7d189c2665

View File

@ -79,6 +79,13 @@ endif()
# Add appropriate flags for GCC
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings")
if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
string(COMPARE GREATER ${CLANG_MAJOR} "3" IS_CLANG_GREATER_THAN_3_X)
string(COMPARE GREATER ${CLANG_MINOR} "5" IS_CLANG_GREATER_THAN_3_5)
if (IS_CLANG_GREATER_THAN_3_X OR IS_CLANG_GREATER_THAN_3_5)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs" )
endif()
endif()
endif ()
# The package needs to be compiler without RTTI information