cmake: disable -Wunused-local-typedefs for gcc 4.8+

-Wunused-local-typedefs is included in -Wall since GCC 4.8, and generates a
flood of "typedef '...' locally defined but not used" warnings in
ac++-1.2-generated code.

Change-Id: I79748d5f049e269053b26935cc7a641caeb6dcba
This commit is contained in:
Horst Schirmeier
2014-03-30 18:17:40 +02:00
committed by Horst Schirmeier
parent 9113d7c2fa
commit dad8a54e09

View File

@ -3,7 +3,10 @@ option( VERBOSE_MAKE "Verbose Makefile output" OFF) # defaults to OFF
set(CMAKE_VERBOSE_MAKEFILE ${VERBOSE_MAKE})
### Additional compiler and linker flags ##
set(CMAKE_C_FLAGS "-g -Wall")
# -Wunused-local-typedefs is included in -Wall since GCC 4.8, and generates a
# flood of "typedef '...' locally defined but not used" warnings in
# ac++-1.2-generated code
set(CMAKE_C_FLAGS "-g -Wall -Wno-unused-local-typedefs")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections")