Add build option wren_with_name_guessing

This commit is contained in:
King_DuckZ 2022-05-15 20:12:20 +02:00
parent 692393285d
commit 400adf50c6
2 changed files with 11 additions and 2 deletions

View file

@ -40,6 +40,11 @@ elif os == 'gnu' and arch == 'aarch64'
func_ptr_size = 8 func_ptr_size = 8
endif endif
compiler_opts = []
if get_option('wrenpp_with_name_guessing')
compiler_opts += ['-DWRENPP_WITH_NAME_GUESSING']
endif
conf.set('POINTER_SIZE', ptr_size) conf.set('POINTER_SIZE', ptr_size)
conf.set('FUNC_POINTER_SIZE', func_ptr_size) conf.set('FUNC_POINTER_SIZE', func_ptr_size)
conf.set('WRENPP_NAME', meson.project_name()) conf.set('WRENPP_NAME', meson.project_name())
@ -66,10 +71,13 @@ wrenpp = library(meson.project_name(),
dependencies: [wren_dep], dependencies: [wren_dep],
include_directories: public_incl, include_directories: public_incl,
install: (not meson.is_subproject() or get_option('default_library')=='shared'), install: (not meson.is_subproject() or get_option('default_library')=='shared'),
c_args: compiler_opts,
cpp_args: compiler_opts,
) )
wrenpp_dep = declare_dependency( wrenpp_dep = declare_dependency(
link_with: wrenpp, link_with: wrenpp,
include_directories: public_incl, include_directories: public_incl,
compile_args: compiler_opts,
) )
if get_option('build_examples') if get_option('build_examples')

View file

@ -1,4 +1,5 @@
option('build_testing', type: 'boolean', value: false) option('build_testing', type: 'boolean', value: false)
option('build_examples', type: 'boolean', value: false) option('build_examples', type: 'boolean', value: false)
option('wren_with_rand', type: 'boolean', value: false, yield: true) option('wren_with_rand', type: 'boolean', value: false)
option('wren_with_meta', type: 'boolean', value: false, yield: true) option('wren_with_meta', type: 'boolean', value: false)
option('wrenpp_with_name_guessing', type: 'boolean', value: true)