Lines 120-142
Link Here
|
120 |
add_extra_compiler_option(-Wformat) |
120 |
add_extra_compiler_option(-Wformat) |
121 |
add_extra_compiler_option(-Werror=format-security -Wformat) |
121 |
add_extra_compiler_option(-Werror=format-security -Wformat) |
122 |
add_extra_compiler_option(-Wmissing-declarations) |
122 |
add_extra_compiler_option(-Wmissing-declarations) |
123 |
add_extra_compiler_option(-Wmissing-prototypes) |
123 |
# add_extra_compiler_option(-Wmissing-prototypes) |
124 |
add_extra_compiler_option(-Wstrict-prototypes) |
124 |
# add_extra_compiler_option(-Wstrict-prototypes) |
125 |
add_extra_compiler_option(-Wundef) |
125 |
add_extra_compiler_option(-Wundef) |
126 |
add_extra_compiler_option(-Winit-self) |
126 |
add_extra_compiler_option(-Winit-self) |
127 |
add_extra_compiler_option(-Wpointer-arith) |
127 |
add_extra_compiler_option(-Wpointer-arith) |
128 |
add_extra_compiler_option(-Wshadow) |
128 |
add_extra_compiler_option(-Wshadow) |
129 |
add_extra_compiler_option(-Wsign-promo) |
129 |
# add_extra_compiler_option(-Wsign-promo) |
130 |
add_extra_compiler_option(-Wuninitialized) |
130 |
add_extra_compiler_option(-Wuninitialized) |
131 |
add_extra_compiler_option(-Winit-self) |
131 |
add_extra_compiler_option(-Winit-self) |
|
|
132 |
# add_extra_compiler_option(-fvisibility-inlines-hidden) |
132 |
|
133 |
|
133 |
if(ENABLE_NOISY_WARNINGS) |
134 |
if(ENABLE_NOISY_WARNINGS) |
134 |
add_extra_compiler_option(-Wcast-align) |
135 |
add_extra_compiler_option(-Wcast-align) |
135 |
add_extra_compiler_option(-Wstrict-aliasing=2) |
136 |
add_extra_compiler_option(-Wstrict-aliasing=2) |
136 |
else() |
137 |
else() |
137 |
add_extra_compiler_option(-Wno-narrowing) |
138 |
add_extra_compiler_option(-Wno-narrowing) |
138 |
add_extra_compiler_option(-Wno-delete-non-virtual-dtor) |
139 |
# add_extra_compiler_option(-Wno-delete-non-virtual-dtor) |
139 |
add_extra_compiler_option(-Wno-unnamed-type-template-args) |
140 |
# add_extra_compiler_option(-Wno-unnamed-type-template-args) |
140 |
add_extra_compiler_option(-Wno-comment) |
141 |
add_extra_compiler_option(-Wno-comment) |
141 |
endif() |
142 |
endif() |
142 |
add_extra_compiler_option(-fdiagnostics-show-option) |
143 |
add_extra_compiler_option(-fdiagnostics-show-option) |
Lines 281-287
Link Here
|
281 |
# set default visibility to hidden |
282 |
# set default visibility to hidden |
282 |
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_OPENCV_GCC_VERSION_NUM GREATER 399) |
283 |
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_OPENCV_GCC_VERSION_NUM GREATER 399) |
283 |
add_extra_compiler_option(-fvisibility=hidden) |
284 |
add_extra_compiler_option(-fvisibility=hidden) |
284 |
add_extra_compiler_option(-fvisibility-inlines-hidden) |
285 |
# add_extra_compiler_option(-fvisibility-inlines-hidden) |
285 |
endif() |
286 |
endif() |
286 |
|
287 |
|
287 |
#combine all "extra" options |
288 |
#combine all "extra" options |