File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,16 @@ add_project_arguments(warning_flags, language: 'cpp')
188
188
# MSVC: Ignore warnings that aren't really harmful, but make those
189
189
# that should not be overlooked stand out.
190
190
if is_msvc
191
- foreach wd : [' /FImsvc_recommended_pragmas.h' , ' /EHsc' , ' /wd4267' , ' /utf-8' ]
191
+ # Turn off harmless warnings but make potentially dangerous ones glaring,
192
+ # distributed with GLib, if available
193
+ use_recommended_pragmas = cpp_compiler.get_supported_arguments(' /FImsvc_recommended_pragmas.h' )
194
+ if use_recommended_pragmas.length() > 0
195
+ add_project_arguments (use_recommended_pragmas, language : ' cpp' )
196
+ else
197
+ disabled_warning = cpp_compiler.get_supported_arguments([' /wd4244' ])
198
+ add_project_arguments (disabled_warning, language : ' cpp' )
199
+ endif
200
+ foreach wd : [' /EHsc' , ' /wd4267' ]
192
201
disabled_warning = cpp_compiler.get_supported_arguments(wd)
193
202
add_project_arguments (disabled_warning, language : ' cpp' )
194
203
endforeach
You can’t perform that action at this time.
0 commit comments