Merge branch 'master' of github.com:libvips/libvips
This commit is contained in:
commit
e1ad26b782
19
meson.build
19
meson.build
@ -3,7 +3,9 @@ project('vips', 'c', 'cpp',
|
||||
meson_version: '>=0.56',
|
||||
default_options: [
|
||||
# this is what glib uses (one of our required deps), so we use it too
|
||||
'c_std=gnu99'
|
||||
'c_std=gnu99',
|
||||
# turn off asserts etc. in release mode
|
||||
'b_ndebug=if-release'
|
||||
]
|
||||
)
|
||||
|
||||
@ -33,6 +35,21 @@ add_project_link_arguments(
|
||||
language: 'c',
|
||||
)
|
||||
|
||||
# if we're optimising (eg. release mode) we turn off cast checks and
|
||||
# g_asserts
|
||||
if get_option('optimization') in ['2', '3', 's']
|
||||
add_project_arguments('-DG_DISABLE_CAST_CHECKS', language : ['cpp', 'c'])
|
||||
add_project_arguments('-DG_DISABLE_CHECKS', language : ['cpp', 'c'])
|
||||
add_project_arguments('-DG_DISABLE_ASSERT', language : ['cpp', 'c'])
|
||||
endif
|
||||
|
||||
# in debug mode we automatically enable leak checks and fatal warnings
|
||||
# also true for 'debugoptimized'
|
||||
if get_option('debug')
|
||||
add_project_arguments('-DDEBUG_FATAL', language : ['cpp', 'c'])
|
||||
add_project_arguments('-DDEBUG_LEAK', language : ['cpp', 'c'])
|
||||
endif
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
cpp = meson.get_compiler('cpp')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user