@@ -45,12 +45,6 @@ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Werror>)
45
45
add_compile_options ($<$<COMPILE_LANG_AND_ID:C,GNU>:-Wno-error=sequence-point>)
46
46
add_compile_options ($<$<COMPILE_LANG_AND_ID:C,GNU>:-Wno-error=strict-overflow>)
47
47
add_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 ()
54
48
55
49
# Enable warnings
56
50
add_compile_options ($<$<COMPILE_LANGUAGE:C,CXX>:-Wall>)
@@ -59,6 +53,10 @@ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Wunused-macros>)
59
53
add_compile_options ($<$<COMPILE_LANGUAGE:C,CXX>:-Wno-error=unused-macros >) # Some false positives / only cover current build configuration
60
54
61
55
# 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 ()
62
60
add_compile_options ($<$<COMPILE_LANG_AND_ID:C,GNU>:-Wno-misleading-indentation>)
63
61
add_compile_options ($<$<COMPILE_LANG_AND_ID:C,GNU>:-Wno-address>)
64
62
add_compile_options ($<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-parameter>)
0 commit comments