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 @@ -184,7 +184,16 @@ add_project_arguments(warning_flags, language: 'cpp')
184
184
# MSVC: Ignore warnings that aren't really harmful, but make those
185
185
# that should not be overlooked stand out.
186
186
if is_msvc
187
- foreach wd : [' /FImsvc_recommended_pragmas.h' , ' /EHsc' , ' /wd4267' ]
187
+ # Turn off harmless warnings but make potentially dangerous ones glaring,
188
+ # distributed with GLib, if available
189
+ use_recommended_pragmas = cpp_compiler.get_supported_arguments(' /FImsvc_recommended_pragmas.h' )
190
+ if use_recommended_pragmas.length() > 0
191
+ add_project_arguments (use_recommended_pragmas, language : ' cpp' )
192
+ else
193
+ disabled_warning = cpp_compiler.get_supported_arguments([' /wd4244' ])
194
+ add_project_arguments (disabled_warning, language : ' cpp' )
195
+ endif
196
+ foreach wd : [' /EHsc' , ' /wd4267' ]
188
197
disabled_warning = cpp_compiler.get_supported_arguments(wd)
189
198
add_project_arguments (disabled_warning, language : ' cpp' )
190
199
endforeach
You can’t perform that action at this time.
0 commit comments