From 939c00a9727e2ce47f320dd02aa3952c146406c7 Mon Sep 17 00:00:00 2001
From: "John M. Lindemon" <jlindemon@gmail.com>
Date: Wed, 27 Feb 2019 20:13:12 -0500
Subject: Fix nvcc error with threads dependency (4999)

---
 mesonbuild/compilers/cuda.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'mesonbuild/compilers/cuda.py')

diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py
index d1964fd..21fa498 100644
--- a/mesonbuild/compilers/cuda.py
+++ b/mesonbuild/compilers/cuda.py
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import re, subprocess, os.path
+import re, os.path
 
 from .. import mlog
 from ..mesonlib import EnvironmentException, Popen_safe
@@ -46,6 +46,9 @@ class CudaCompiler(Compiler):
     def get_no_stdinc_args(self):
         return []
 
+    def thread_link_flags(self, environment):
+        return ['-Xcompiler=-pthread']
+
     def sanity_check(self, work_dir, environment):
         mlog.debug('Sanity testing ' + self.get_display_language() + ' compiler:', ' '.join(self.exelist))
         mlog.debug('Is cross compiler: %s.' % str(self.is_cross))
-- 
cgit v1.1