diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-01-30 19:35:58 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-01-30 19:35:58 +0200 |
commit | 2107be2a7803fb25421fb886df66006b93448667 (patch) | |
tree | 6cd1c8ded29686554d409e4de6133dd16556cdce /compilers.py | |
parent | 4293a2ac65e2900333dca7cf4296d05adb631560 (diff) | |
download | meson-2107be2a7803fb25421fb886df66006b93448667.zip meson-2107be2a7803fb25421fb886df66006b93448667.tar.gz meson-2107be2a7803fb25421fb886df66006b93448667.tar.bz2 |
Add thread flags to compilers and use them on dependencies that require threads. Fixes #31.
Diffstat (limited to 'compilers.py')
-rw-r--r-- | compilers.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compilers.py b/compilers.py index 7100113..7561883 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) |