@@ -38,9 +38,8 @@ function(_get_common_test_compile_options output_var c_test flags)
38
38
endif ()
39
39
# list(APPEND compile_options "-Wconversion")
40
40
# list(APPEND compile_options "-Wno-sign-conversion")
41
- # list(APPEND compile_options "-Wimplicit-fallthrough")
42
- # list(APPEND compile_options "-Wwrite-strings")
43
- list (APPEND compile_options "-Wextra-semi" )
41
+ list (APPEND compile_options "-Wimplicit-fallthrough" )
42
+ list (APPEND compile_options "-Wwrite-strings" )
44
43
# Silence this warning because _Complex is a part of C99.
45
44
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
46
45
if (NOT c_test )
@@ -51,13 +50,14 @@ function(_get_common_test_compile_options output_var c_test flags)
51
50
list (APPEND compile_options "-Wno-gnu-imaginary-constant" )
52
51
endif ()
53
52
list (APPEND compile_options "-Wno-pedantic" )
54
- # if(NOT CMAKE_COMPILER_IS_GNUCXX)
55
- # list(APPEND compile_options "-Wnewline-eof")
56
- # list(APPEND compile_options "-Wnonportable-system-include-path")
57
- # list(APPEND compile_options "-Wstrict-prototypes")
58
- # list(APPEND compile_options "-Wthread-safety")
59
- # list(APPEND compile_options "-Wglobal-constructors")
60
- # endif()
53
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
54
+ list (APPEND compile_options "-Wstrict-prototypes" )
55
+ list (APPEND compile_options "-Wextra-semi" )
56
+ list (APPEND compile_options "-Wnewline-eof" )
57
+ list (APPEND compile_options "-Wnonportable-system-include-path" )
58
+ list (APPEND compile_options "-Wthread-safety" )
59
+ # list(APPEND compile_options "-Wglobal-constructors")
60
+ endif ()
61
61
endif ()
62
62
set (${output_var} ${compile_options} PARENT_SCOPE )
63
63
endfunction ()
0 commit comments