Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meson test api c files build fix #2259

Merged
merged 3 commits into from
Mar 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ if cpp.get_id() == 'msvc'
'/wd4305', # truncating type conversion (e.g. double -> float)
cpp.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8
]
add_project_arguments(msvc_args, language : 'c')
add_project_arguments(msvc_args, language : 'cpp')
add_project_arguments(msvc_args, language : ['c', 'cpp'])
# Disable SAFESEH with MSVC for libs that use external deps that are built with MinGW
# noseh_link_args = ['/SAFESEH:NO']
endif

add_global_arguments(cpp.get_supported_arguments([
add_project_arguments(cpp.get_supported_arguments([
'-fno-rtti',
'-fno-exceptions',
'-fno-threadsafe-statics',
Expand All @@ -49,7 +48,7 @@ add_global_arguments(cpp.get_supported_arguments([

if host_machine.cpu_family() == 'arm' and cpp.alignment('struct { char c; }') != 1
if cpp.has_argument('-mstructure-size-boundary=8')
add_global_arguments('-mstructure-size-boundary=8', language : 'cpp')
add_project_arguments('-mstructure-size-boundary=8', language : 'cpp')
endif
endif

Expand Down Expand Up @@ -145,13 +144,14 @@ deps = []

conf = configuration_data()
incconfig = include_directories('.')
cpp_args = ['-DHAVE_CONFIG_H']

add_project_arguments('-DHAVE_CONFIG_H', language: ['c', 'cpp'])

warn_cflags = [
'-Wno-non-virtual-dtor',
]

cpp_args += cpp.get_supported_arguments(warn_cflags)
cpp_args = cpp.get_supported_arguments(warn_cflags)

if m_dep.found()
deps += [m_dep]
Expand Down
11 changes: 6 additions & 5 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,6 @@ if conf.get('HAVE_GLIB', 0) == 1
hb_headers += hb_glib_headers
endif

if conf.get('HAVE_ICU', 0) == 1
hb_sources += hb_icu_sources
hb_headers += hb_icu_headers
endif

if conf.get('HAVE_UNISCRIBE', 0) == 1
hb_sources += ['hb-uniscribe.cc']
hb_headers += ['hb-uniscribe.h']
Expand All @@ -210,6 +205,12 @@ if get_option('amalgam')
hb_sources = ['harfbuzz.cc']
endif

# FIXME: move into harfbuzz-icu module
if conf.get('HAVE_ICU', 0) == 1
hb_sources += hb_icu_sources
hb_headers += hb_icu_headers
endif

# harfbuzz
gen_def = find_program('gen-def.py')
harfbuzz_def = custom_target('harfbuzz.def',
Expand Down
3 changes: 1 addition & 2 deletions test/api/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ if conf.get('HAVE_GLIB', 0) == 1
opts = test_data.length() > 1 ? test_data[1] : {}
extra_c_args = opts.get('c_args', [])



test_name = fname.split('.')[0].underscorify()
exe = executable(test_name, fname,
c_args: extra_c_args,
cpp_args: cpp_args + extra_c_args,
include_directories: [incconfig, incsrc],
dependencies: deps,
Expand Down