File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,18 @@ IF(NOT PLUGIN_PERFSCHEMA STREQUAL NO)
9
9
add_definitions (-DHAVE_PSI_INTERFACE= )
10
10
ENDIF ()
11
11
12
+ # new gcc is quite buggy re. spurious warnings. let's shut it up
13
+ IF (CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "12.0.0" )
14
+ # 12
15
+ MY_CHECK_AND_SET_COMPILER_FLAG ("-Wno-error=restrict" )
16
+ MY_CHECK_AND_SET_COMPILER_FLAG ("-Wno-error=use-after-free" )
17
+ # 13
18
+ MY_CHECK_AND_SET_COMPILER_FLAG ("-Wno-error=maybe-uninitialized" )
19
+ MY_CHECK_AND_SET_COMPILER_FLAG ("-Wno-error=dangling-reference" )
20
+ MY_CHECK_AND_SET_COMPILER_FLAG ("-Wno-error=dangling-pointer" )
21
+ ENDIF ()
22
+ MY_CHECK_AND_SET_COMPILER_FLAG ("-fno-strict-aliasing" )
23
+ SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed" )
12
24
13
25
# this does everything, gets the var from the correct scope, appends new
14
26
# values, sets in the correct scope
You can’t perform that action at this time.
0 commit comments