mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-03 17:48:56 +01:00 
			
		
		
		
	build: meson: add warning flags
Courtesy of GTK+. https://bugzilla.gnome.org/show_bug.cgi?id=793399
This commit is contained in:
		
				
					committed by
					
						
						Philip Withnall
					
				
			
			
				
	
			
			
			
						parent
						
							aef0e694eb
						
					
				
				
					commit
					9d24c8b223
				
			
							
								
								
									
										21
									
								
								meson.build
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								meson.build
									
									
									
									
									
								
							@@ -269,6 +269,27 @@ foreach m : struct_members
 | 
				
			|||||||
  endif
 | 
					  endif
 | 
				
			||||||
endforeach
 | 
					endforeach
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Compiler flags
 | 
				
			||||||
 | 
					if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
 | 
				
			||||||
 | 
					  test_c_args = [
 | 
				
			||||||
 | 
					    '-Wall',
 | 
				
			||||||
 | 
					    '-Wduplicated-branches',
 | 
				
			||||||
 | 
					    '-Wstrict-prototypes',
 | 
				
			||||||
 | 
					    '-Werror=declaration-after-statement',
 | 
				
			||||||
 | 
					    '-Werror=format=2',
 | 
				
			||||||
 | 
					    '-Werror=format-security',
 | 
				
			||||||
 | 
					    '-Werror=implicit-function-declaration',
 | 
				
			||||||
 | 
					    '-Werror=init-self',
 | 
				
			||||||
 | 
					    '-Werror=missing-include-dirs',
 | 
				
			||||||
 | 
					    '-Werror=missing-prototypes',
 | 
				
			||||||
 | 
					    '-Werror=pointer-arith',
 | 
				
			||||||
 | 
					  ]
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  test_c_args = []
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Windows Support (Vista+)
 | 
					# Windows Support (Vista+)
 | 
				
			||||||
if host_system == 'windows'
 | 
					if host_system == 'windows'
 | 
				
			||||||
  glib_conf.set('_WIN32_WINNT', '0x0601')
 | 
					  glib_conf.set('_WIN32_WINNT', '0x0601')
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user