From 6ad7fbf9509dd68792df7df08b785967a067d4c4 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 5 Apr 2019 16:41:08 -0700 Subject: dependencies/misc: don't special case threads Instad of having special casing of threads in the backends and everywehre else, do what we did for openmp, create a real dependency. Then make use of the fact that dependencies can now have sub dependencies to add threads. --- mesonbuild/dependencies/boost.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mesonbuild/dependencies/boost.py') diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py index 6a8050d..62a652a 100644 --- a/mesonbuild/dependencies/boost.py +++ b/mesonbuild/dependencies/boost.py @@ -22,6 +22,7 @@ from .. import mesonlib from ..environment import detect_cpu_family from .base import (DependencyException, ExternalDependency) +from .misc import ThreadDependency # On windows 3 directory layouts are supported: # * The default layout (versioned) installed: @@ -103,6 +104,8 @@ class BoostDependency(ExternalDependency): self.is_multithreading = threading == "multi" self.requested_modules = self.get_requested(kwargs) + if 'thread' in self.requested_modules: + self.ext_deps.append(ThreadDependency(environment, kwargs)) self.boost_root = None self.boost_roots = [] @@ -488,9 +491,6 @@ class BoostDependency(ExternalDependency): def get_sources(self): return [] - def need_threads(self): - return 'thread' in self.requested_modules - # Generated with boost_names.py BOOST_LIBS = [ -- cgit v1.1