sundials +sycl: add cxxflags=-fsycl via flag_handler (#40845)

This commit is contained in:
eugeneswalker 2023-11-04 06:55:19 -07:00 committed by GitHub
parent 88ee3a0fba
commit fd22d109a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -200,11 +200,11 @@ spack:
- kokkos +sycl +openmp cxxstd=17 +tests +examples
- kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +tests +examples
- slate +sycl
- sundials +sycl cxxstd=17 +examples-install
- tau +mpi +opencl +level_zero ~pdt +syscall # tau: requires libdrm.so to be installed
# --
# - ginkgo +oneapi # InstallError: Ginkgo's oneAPI backend requires theDPC++ compiler as main CXX compiler.
# - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc
# - sundials +sycl cxxstd=17 # sundials: include/sunmemory/sunmemory_sycl.h:20:10: fatal error: 'CL/sycl.hpp' file not found
- py-scipy

View file

@ -292,6 +292,12 @@ class Sundials(CMakePackage, CudaPackage, ROCmPackage):
# fix issues with exported PETSc target(s) in SUNDIALSConfig.cmake
patch("sundials-v5.8.0.patch", when="@5.8.0")
def flag_handler(self, name, flags):
if name == "cxxflags":
if self.spec.satisfies("+sycl"):
flags.append("-fsycl")
return (flags, None, None)
# ==========================================================================
# SUNDIALS Settings
# ==========================================================================