Skip to content

Commit dd98d2a

Browse files
authored
build(meson): warn/fail on 32-bit machines (#2181)
On 32-bit Windows, meson setup fails with an unclear error: meson.build:25:16: ERROR: Could not get define 'CPPHTTPLIB_VERSION' The actual problem is that httplib.h #errors out. Have the Meson logic explicitly check for a 32-bit host and warn or error, matching the check in httplib.h. Phrase the Windows error in a way that triggers WrapDB CI's unsupported architecture check.
1 parent 1f110b5 commit dd98d2a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ project(
1818

1919
cxx = meson.get_compiler('cpp')
2020

21+
if cxx.sizeof('void *') != 8
22+
if host_machine.system() == 'windows'
23+
error('unsupported architecture: cpp-httplib doesn\'t support 32-bit Windows. Please use a 64-bit compiler.')
24+
else
25+
warning('cpp-httplib doesn\'t support 32-bit platforms. Please use a 64-bit compiler.')
26+
endif
27+
endif
28+
2129
# Check just in case downstream decides to edit the source
2230
# and add a project version
2331
version = meson.project_version()

0 commit comments

Comments
 (0)