diff --git a/meson.build b/meson.build index 8595615..a31a211 100644 --- a/meson.build +++ b/meson.build @@ -40,6 +40,11 @@ elif os == 'gnu' and arch == 'aarch64' func_ptr_size = 8 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('FUNC_POINTER_SIZE', func_ptr_size) conf.set('WRENPP_NAME', meson.project_name()) @@ -66,10 +71,13 @@ wrenpp = library(meson.project_name(), dependencies: [wren_dep], include_directories: public_incl, install: (not meson.is_subproject() or get_option('default_library')=='shared'), + c_args: compiler_opts, + cpp_args: compiler_opts, ) wrenpp_dep = declare_dependency( link_with: wrenpp, include_directories: public_incl, + compile_args: compiler_opts, ) if get_option('build_examples') diff --git a/meson_options.txt b/meson_options.txt index 23a3a31..2a9a580 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,5 @@ option('build_testing', type: 'boolean', value: false) option('build_examples', type: 'boolean', value: false) -option('wren_with_rand', type: 'boolean', value: false, yield: true) -option('wren_with_meta', type: 'boolean', value: false, yield: true) +option('wren_with_rand', type: 'boolean', value: false) +option('wren_with_meta', type: 'boolean', value: false) +option('wrenpp_with_name_guessing', type: 'boolean', value: true)