diff options
Diffstat (limited to 'var')
3 files changed, 45 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/define-cmake-prefix-paths/package.py b/var/spack/repos/builtin.mock/packages/define-cmake-prefix-paths/package.py new file mode 100644 index 0000000000..07466a21a3 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/define-cmake-prefix-paths/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class DefineCmakePrefixPaths(Package): + """Package that defines cmake_prefix_paths""" + + homepage = "http://www.example.com" + url = "http://www.example.com/definecmakeprefixpaths-1.0.tar.gz" + + version("1.0", "0123456789abcdef0123456789abcdef") + + @property + def cmake_prefix_paths(self): + paths = [self.prefix.test] + return paths diff --git a/var/spack/repos/builtin.mock/packages/depends-on-define-cmake-prefix-paths/package.py b/var/spack/repos/builtin.mock/packages/depends-on-define-cmake-prefix-paths/package.py new file mode 100644 index 0000000000..724e61f617 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/depends-on-define-cmake-prefix-paths/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class DependsOnDefineCmakePrefixPaths(Package): + """Package that defines cmake_prefix_paths""" + + homepage = "http://www.example.com" + url = "http://www.example.com/dependsonefinecmakeprefixpaths-1.0.tar.gz" + + version("1.0", "0123456789abcdef0123456789abcdef") + + depends_on("define-cmake-prefix-paths") diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index fd76aabebd..4f39731cee 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -465,6 +465,14 @@ class Cuda(Package): def setup_dependent_build_environment(self, env, dependent_spec): env.set("CUDAHOSTCXX", dependent_spec.package.compiler.cxx) + @property + def cmake_prefix_paths(self): + cmake_prefix_paths = [self.prefix] + if self.spec.satisfies("target=x86_64:"): + cub_path = self.prefix.targets + "/x86_64-linux/lib/cmake" + cmake_prefix_paths.append(cub_path) + return cmake_prefix_paths + def setup_run_environment(self, env): env.set("CUDA_HOME", self.prefix) |