diff options
author | Sean Koyama <koysean@gmail.com> | 2023-06-01 18:17:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 16:17:04 -0700 |
commit | 42d374a34df6cb4f66b23e6607927ef676134edc (patch) | |
tree | d61c85ce7034c7bc9480898a4104c9feebbe1bfc | |
parent | d90e4fcc3d8eb3323ed89251b2f077563a20873e (diff) | |
download | spack-42d374a34df6cb4f66b23e6607927ef676134edc.tar.gz spack-42d374a34df6cb4f66b23e6607927ef676134edc.tar.bz2 spack-42d374a34df6cb4f66b23e6607927ef676134edc.tar.xz spack-42d374a34df6cb4f66b23e6607927ef676134edc.zip |
double-batched-fft-library: patch to add search paths to findOpenCL.cmake (#36355)
* double-batched-fft-library: PATCH: add search paths to find libOpenCL
* Apply patch up to version 0.3.6
2 files changed, 44 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/double-batched-fft-library/0001-Add-CPATH-and-LIBRARY_PATHs-to-OpenCL-search-paths.patch b/var/spack/repos/builtin/packages/double-batched-fft-library/0001-Add-CPATH-and-LIBRARY_PATHs-to-OpenCL-search-paths.patch new file mode 100644 index 0000000000..cbcf425a1d --- /dev/null +++ b/var/spack/repos/builtin/packages/double-batched-fft-library/0001-Add-CPATH-and-LIBRARY_PATHs-to-OpenCL-search-paths.patch @@ -0,0 +1,42 @@ +From ae55be42bcc21d9ae1f57604b7c6faf9695f98ae Mon Sep 17 00:00:00 2001 +From: Sean Koyama <skoyama@anl.gov> +Date: Thu, 23 Mar 2023 17:32:09 +0000 +Subject: [PATCH] Add CPATH and LIBRARY_PATHs to OpenCL search paths + +--- + cmake/FindOpenCL.cmake | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/cmake/FindOpenCL.cmake b/cmake/FindOpenCL.cmake +index a0dff56..e7d7873 100644 +--- a/cmake/FindOpenCL.cmake ++++ b/cmake/FindOpenCL.cmake +@@ -64,6 +64,7 @@ else() + find_path(OpenCL_INCLUDE_DIR NAMES CL/cl.h OpenCL/cl.h + HINTS + ENV OpenCL_ROOT ++ ENV CPATH + ENV AMDAPPSDKROOT + ENV INTELOCLSDKROOT + ENV CUDA_PATH +@@ -80,6 +81,8 @@ else() + find_library(OpenCL_LIBRARY NAMES OpenCL + HINTS + ENV OpenCL_ROOT ++ ENV LIBRARY_PATH ++ ENV LD_LIBRARY_PATH + ENV AMDAPPSDKROOT + ENV INTELOCLSDKROOT + ENV CUDA_PATH +@@ -96,6 +99,8 @@ else() + find_library(OpenCL_LIBRARY NAMES OpenCL + HINTS + ENV OpenCL_ROOT ++ ENV LIBRARY_PATH ++ ENV LD_LIBRARY_PATH + ENV AMDAPPSDKROOT + ENV INTELOCLSDKROOT + ENV CUDA_PATH +-- +2.34.1 + diff --git a/var/spack/repos/builtin/packages/double-batched-fft-library/package.py b/var/spack/repos/builtin/packages/double-batched-fft-library/package.py index 1276d493ec..7f9154ca7b 100644 --- a/var/spack/repos/builtin/packages/double-batched-fft-library/package.py +++ b/var/spack/repos/builtin/packages/double-batched-fft-library/package.py @@ -34,6 +34,8 @@ class DoubleBatchedFftLibrary(CMakePackage): depends_on("oneapi-level-zero", when="+level-zero") depends_on("opencl", when="+opencl") + patch("0001-Add-CPATH-and-LIBRARY_PATHs-to-OpenCL-search-paths.patch", when="@:0.3.6") + def cmake_args(self): cxx_compiler = os.path.basename(self.compiler.cxx) if self.spec.satisfies("+sycl") and cxx_compiler not in ["icpx", "dpcpp"]: |