From 2107be2a7803fb25421fb886df66006b93448667 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Fri, 30 Jan 2015 19:35:58 +0200 Subject: Add thread flags to compilers and use them on dependencies that require threads. Fixes #31. --- compilers.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'compilers.py') diff --git a/compilers.py b/compilers.py index 7100113bb..75618830b 100644 --- a/compilers.py +++ b/compilers.py @@ -395,6 +395,12 @@ void bar() { ''' return self.compiles(templ % (prefix, typename, membername)) + def thread_flags(self): + return ['-pthread'] + + def thread_link_flags(self): + return ['-pthread'] + class CPPCompiler(CCompiler): def __init__(self, exelist, version, is_cross, exe_wrap): CCompiler.__init__(self, exelist, version, is_cross, exe_wrap) @@ -943,6 +949,13 @@ class VisualStudioCCompiler(CCompiler): def build_rpath_args(self, build_dir, rpath_paths, install_rpath): return [] + # FIXME, no idea what these should be. + def thread_flags(self): + return [] + + def thread_link_flags(self): + return [] + class VisualStudioCPPCompiler(VisualStudioCCompiler): def __init__(self, exelist, version, is_cross, exe_wrap): VisualStudioCCompiler.__init__(self, exelist, version, is_cross, exe_wrap) -- cgit v1.2.3