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

mpdecimal: don't run tests if random is missing #1321

Merged
merged 2 commits into from
Dec 3, 2023
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
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -2102,6 +2102,7 @@
"mpdecpp"
],
"versions": [
"2.5.1-4",
"2.5.1-3",
"2.5.1-2",
"2.5.1-1",
Expand Down
10 changes: 4 additions & 6 deletions subprojects/packagefiles/mpdecimal/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ machine = get_option('machine')

if machine == 'auto'
if host_machine.system() == 'windows'
if host_machine.cpu_family() == 'x86'
if have_uint128_t
machine = 'uint128'
elif host_machine.cpu_family() == 'x86'
machine = 'ppro'
elif host_machine.cpu_family() == 'x86_64'
machine = 'x64'
else
error('machine probing on Windows only supports x86/x64')
endif
else
if cc.sizeof('size_t') == 8
Expand Down Expand Up @@ -219,9 +219,7 @@ if machine == 'x64'
elif machine == 'uint128'
conf.set('MPD_HEADER_CONFIG', mpd_header_config_64)
add_project_arguments('-DCONFIG_64', '-DANSI', '-DHAVE_UINT128_T', language: 'c')
if host_machine.system() == 'windows'
error('machine "uint128" not supported on Windows')
else
if host_machine.system() != 'windows'
add_project_arguments('-m64', language: ['c', 'cpp'])
add_project_link_arguments('-m64', language: ['c', 'cpp'])
endif
Expand Down
5 changes: 5 additions & 0 deletions subprojects/packagefiles/mpdecimal/tests++/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#Windows does not have random
if not cc.has_function('random')
subdir_done()
endif

conf = configuration_data()

if cc.has_header('pthread.h')
Expand Down
5 changes: 5 additions & 0 deletions subprojects/packagefiles/mpdecimal/tests/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#Windows does not have random
if not cc.has_function('random')
subdir_done()
endif

runtest = executable(
'runtest',
['runtest.c', 'test.c'],
Expand Down