diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-02-04 20:33:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-04 20:33:26 +0100 |
commit | e26b5a119e0b3f76cc93f65ecf4251dc6d52ecfe (patch) | |
tree | 73851cd37b531388e4866a480c96a4e3b9644382 /mesonbuild/environment.py | |
parent | c1fa61b7d9361d563e22b48974b55a188b7e9d70 (diff) | |
parent | 592af0b1afa03b10beffee481c00c60a7b7db907 (diff) | |
download | meson-e26b5a119e0b3f76cc93f65ecf4251dc6d52ecfe.zip meson-e26b5a119e0b3f76cc93f65ecf4251dc6d52ecfe.tar.gz meson-e26b5a119e0b3f76cc93f65ecf4251dc6d52ecfe.tar.bz2 |
Merge pull request #4835 from obilaniu/cudaimprovements
CUDA support improvements
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 3fb93ca..f9defcd 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -766,7 +766,22 @@ class Environment: except OSError as e: popen_exceptions[' '.join(compiler + [arg])] = e continue - version = search_version(out) + # Example nvcc printout: + # + # nvcc: NVIDIA (R) Cuda compiler driver + # Copyright (c) 2005-2018 NVIDIA Corporation + # Built on Sat_Aug_25_21:08:01_CDT_2018 + # Cuda compilation tools, release 10.0, V10.0.130 + # + # search_version() first finds the "10.0" after "release", + # rather than the more precise "10.0.130" after "V". + # The patch version number is occasionally important; For + # instance, on Linux, + # - CUDA Toolkit 8.0.44 requires NVIDIA Driver 367.48 + # - CUDA Toolkit 8.0.61 requires NVIDIA Driver 375.26 + # Luckily, the "V" also makes it very simple to extract + # the full version: + version = out.strip().split('V')[-1] cls = CudaCompiler return cls(ccache + compiler, version, is_cross, exe_wrap) raise EnvironmentException('Could not find suitable CUDA compiler: "' + ' '.join(compilers) + '"') |