vecmem: fix SYCL compiler specification (#49108)

This commit adds an additional requirement to the vecmem package,
requiring the OneAPI compiler iff the `sycl` variant is turned on. This
allows us to correctly set the non-standard `SYCLCXX` environment
variable.
This commit is contained in:
Stephen Nicholas Swatman 2025-02-19 15:54:47 +01:00 committed by GitHub
parent f76e01707a
commit 6afe002c94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,6 +67,11 @@ class Vecmem(CMakePackage, CudaPackage):
depends_on("hip", when="+hip")
depends_on("sycl", when="+sycl")
# NOTE: this package uses a non-standard "SYCLCXX" environment variable which we can
# set easily only by requiring the OneAPI compiler, as this is automatically capable
# of compiling SYCL code.
requires("%oneapi", when="+sycl")
# FIXME: due to #29447, googletest is not available to cmake when building with --test,
# and we can choose between always depending on googletest, or using FetchContent
# depends_on("googletest", type="test")