King_DuckZ
9566553856
Following what's been suggested on IRC libera.chat #mesonbuild, this is so that the -march=generic+crc option only applies to the code it should apply to and not to the entire code base.
61 lines
1.3 KiB
Meson
61 lines
1.3 KiB
Meson
project('wrenpp', 'cpp',
|
|
version: '0.1.3',
|
|
meson_version: '>=0.49.2',
|
|
default_options: ['buildtype=release', 'cpp_std=c++20', 'b_ndebug=if-release']
|
|
)
|
|
|
|
wren_dep = dependency('wren', version: '>=0.2.0',
|
|
fallback: ['wren', 'wren_dep'],
|
|
default_options: [
|
|
'default_library=static',
|
|
'build_testing=false',
|
|
'wren_with_rand=' + get_option('wren_with_rand').to_string(),
|
|
'wren_with_meta=' + get_option('wren_with_meta').to_string(),
|
|
],
|
|
static: true,
|
|
)
|
|
public_incl = [include_directories('include')]
|
|
|
|
os = host_machine.system()
|
|
if os == 'gnu'
|
|
os = 'hurd'
|
|
elif os == 'linux'
|
|
os = 'gnu'
|
|
endif
|
|
|
|
arch = host_machine.cpu_family()
|
|
if arch == 'x86_64'
|
|
arch = 'amd64'
|
|
endif
|
|
|
|
ptr_size = 0
|
|
func_ptr_size = 0
|
|
|
|
conf = configuration_data()
|
|
if os == 'gnu' and arch == 'amd64'
|
|
ptr_size = 8
|
|
func_ptr_size = 8
|
|
elif os == 'gnu' and arch == 'aarch64'
|
|
ptr_size = 8
|
|
func_ptr_size = 8
|
|
endif
|
|
|
|
global_compiler_opts = []
|
|
if get_option('wrenpp_with_name_guessing')
|
|
global_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())
|
|
conf.set('WRENPP_WITH_SSE42', get_option('wrenpp_with_sse42'))
|
|
|
|
subdir('include')
|
|
subdir('src')
|
|
|
|
if get_option('build_examples')
|
|
subdir('examples')
|
|
endif
|
|
if get_option('build_testing')
|
|
subdir('test')
|
|
endif
|