@@ -45,12 +45,6 @@ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Werror>)
4545add_compile_options ($<$<COMPILE_LANG_AND_ID :C ,GNU >:-Wno -error =sequence -point >)
4646add_compile_options ($<$<COMPILE_LANG_AND_ID :C ,GNU >:-Wno -error =strict -overflow >)
4747add_compile_options ($<$<COMPILE_LANG_AND_ID :C ,GNU >:-Wno -error =logical -not -parentheses >)
48- if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
49- # this warning was added in gcc 8 https://debarshiray.wordpress.com/2019/04/01/about-wextra-and-wcast-function-type/
50-
51- add_compile_options ($<$<COMPILE_LANG_AND_ID :C ,GNU >:-Wno -cast -function -type >) #disable warning
52- # add_compile_options($<$<COMPILE_LANG_AND_ID:C,GNU>:-Wno-error=cast-function-type>) #disable errors from warning
53- endif ()
5448
5549# Enable warnings
5650add_compile_options ($<$<COMPILE_LANGUAGE :C ,CXX >:-Wall >)
@@ -59,6 +53,10 @@ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Wunused-macros>)
5953add_compile_options ($<$<COMPILE_LANGUAGE :C ,CXX >:-Wno -error =unused -macros >) # Some false positives / only cover current build configuration
6054
6155# Exclude some warnings
56+ if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0)
57+ # this warning was added in gcc 8 https://debarshiray.wordpress.com/2019/04/01/about-wextra-and-wcast-function-type/
58+ add_compile_options ($<$<COMPILE_LANGUAGE :C ,CXX >:-Wno -cast -function -type >)
59+ endif ()
6260add_compile_options ($<$<COMPILE_LANG_AND_ID :C ,GNU >:-Wno -misleading -indentation >)
6361add_compile_options ($<$<COMPILE_LANG_AND_ID :C ,GNU >:-Wno -address >)
6462add_compile_options ($<$<COMPILE_LANGUAGE :C ,CXX >:-Wno -unused -parameter >)
0 commit comments