Open fghzxm opened 2 years ago
Could you please check if this change fixes your issue? I am unable to reproduce this with your test case since I am on Linux.
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py
index 544e844f2..5477a7467 100644
--- a/mesonbuild/dependencies/boost.py
+++ b/mesonbuild/dependencies/boost.py
@@ -1032,8 +1032,8 @@ boost_libraries = {
),
'boost_thread': BoostLibrary(
name='boost_thread',
- shared=['-DBOOST_THREAD_BUILD_DLL=1', '-DBOOST_THREAD_USE_DLL=1'],
- static=['-DBOOST_THREAD_BUILD_LIB=1', '-DBOOST_THREAD_USE_LIB=1'],
+ shared=['-DBOOST_THREAD_BUILD_DLL=1', '-DBOOST_THREAD_USE_DLL=1', '-DBOOST_HAS_THREADS'],
+ static=['-DBOOST_THREAD_BUILD_LIB=1', '-DBOOST_THREAD_USE_LIB=1', '-DBOOST_HAS_THREADS'],
single=[],
multi=[],
),
Also dependency('boost')
should be dependency('boost', modules: ['thread'])
.
Describe the bug When using the boost dependency (with
threading : multi
),-DBOOST_HAS_THREADS
is not added automatically to the compiler arguments.To Reproduce
Expected behavior Compilation succeeds.
Actual behavior
system parameters
meson --version
ninja --version
if it's a Ninja build