mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
build: Force-include msvc_recommended_pragmas.h on Visual Studio
By doing so, we essentially cover the various compiler flags that we want to use for non-Visual Studio builds to check for warnings that might cause real concern. This also skips the checks for the various GCC-isque CFlag checks that are scattered in the various build files on Visual Studio builds, since they are essentially meaningless on Visual Studio builds.
This commit is contained in:
parent
6747ec55dd
commit
1a19f05a0e
@ -29,17 +29,22 @@ cmph_deps = [
|
||||
cc.find_library('m', required: false),
|
||||
]
|
||||
|
||||
custom_c_args = cc.get_supported_arguments([
|
||||
'-Wno-implicit-fallthrough',
|
||||
'-Wno-old-style-definition',
|
||||
'-Wno-suggest-attribute=noreturn',
|
||||
'-Wno-type-limits',
|
||||
'-Wno-undef',
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-cast-align',
|
||||
'-Wno-unused-function',
|
||||
'-Wno-return-type',
|
||||
])
|
||||
custom_c_args = []
|
||||
|
||||
if cc.get_id() != 'msvc'
|
||||
custom_c_args = cc.get_supported_arguments([
|
||||
'-Wno-implicit-fallthrough',
|
||||
'-Wno-old-style-definition',
|
||||
'-Wno-suggest-attribute=noreturn',
|
||||
'-Wno-type-limits',
|
||||
'-Wno-undef',
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-cast-align',
|
||||
'-Wno-unused-function',
|
||||
'-Wno-return-type',
|
||||
])
|
||||
endif
|
||||
|
||||
cmph = static_library('cmph',
|
||||
sources: cmph_sources,
|
||||
c_args: gi_hidden_visibility_cflags + custom_c_args,
|
||||
@ -51,10 +56,13 @@ cmph_dep = declare_dependency(
|
||||
include_directories: include_directories('.'),
|
||||
)
|
||||
|
||||
custom_c_args = cc.get_supported_arguments([
|
||||
'-Wno-old-style-definition',
|
||||
'-Wno-type-limits',
|
||||
])
|
||||
if cc.get_id() != 'msvc'
|
||||
custom_c_args = cc.get_supported_arguments([
|
||||
'-Wno-old-style-definition',
|
||||
'-Wno-type-limits',
|
||||
])
|
||||
endif
|
||||
|
||||
cmph_test = executable('cmph-bdz-test', '../cmph-bdz-test.c',
|
||||
dependencies: [
|
||||
cmph_dep,
|
||||
|
43
meson.build
43
meson.build
@ -1,9 +1,14 @@
|
||||
subdir('cmph')
|
||||
|
||||
custom_c_args = cc.get_supported_arguments([
|
||||
'-Wno-old-style-definition',
|
||||
'-Wno-cast-align',
|
||||
])
|
||||
custom_c_args = []
|
||||
|
||||
if cc.get_id() != 'msvc'
|
||||
custom_c_args = cc.get_supported_arguments([
|
||||
'-Wno-old-style-definition',
|
||||
'-Wno-cast-align',
|
||||
])
|
||||
endif
|
||||
|
||||
girepo_gthash_lib = static_library('girepository-gthash',
|
||||
sources: 'gthash.c',
|
||||
include_directories : configinc,
|
||||
@ -21,11 +26,14 @@ girepo_gthash_dep = declare_dependency(
|
||||
include_directories: include_directories('.'),
|
||||
)
|
||||
|
||||
custom_c_args = cc.get_supported_arguments([
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-duplicated-branches',
|
||||
'-Wno-cast-align',
|
||||
])
|
||||
if cc.get_id() != 'msvc'
|
||||
custom_c_args = cc.get_supported_arguments([
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-duplicated-branches',
|
||||
'-Wno-cast-align',
|
||||
])
|
||||
endif
|
||||
|
||||
girepo_internals_lib = static_library('girepository-internals',
|
||||
sources: [
|
||||
'girmodule.c',
|
||||
@ -145,13 +153,16 @@ girepo_gir_sources = files(
|
||||
|
||||
install_headers(girepo_headers, subdir: 'gobject-introspection-1.0')
|
||||
|
||||
custom_c_args = cc.get_supported_arguments([
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-duplicated-branches',
|
||||
'-Wno-type-limits',
|
||||
'-Wno-cast-align',
|
||||
'-Wno-missing-field-initializers',
|
||||
])
|
||||
if cc.get_id() != 'msvc'
|
||||
custom_c_args = cc.get_supported_arguments([
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-duplicated-branches',
|
||||
'-Wno-type-limits',
|
||||
'-Wno-cast-align',
|
||||
'-Wno-missing-field-initializers',
|
||||
])
|
||||
endif
|
||||
|
||||
girepo_lib = shared_library('girepository-1.0',
|
||||
sources: girepo_sources,
|
||||
include_directories : configinc,
|
||||
|
Loading…
Reference in New Issue
Block a user