Fix kokkos package.py to filter spack wrappers in launch compiler and cmake configs (#35494)

Kokkos when compiled by spack without +wrapper could potentially capture the spack compiler wrappers, resulting in cmake configs and kokkos_launch_compiler trying to run the spack compiler wrapper after installation.
This commit is contained in:
Patrick Bridges 2023-02-20 02:23:37 -07:00 committed by GitHub
parent c769582709
commit 9d9ea07424
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -226,6 +226,13 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
variant("shared", default=True, description="Build shared libraries") variant("shared", default=True, description="Build shared libraries")
# Filter spack-generated files that may include links to the
# spack compiler wrappers
filter_compiler_wrappers("kokkos_launch_compiler", relative_root="bin")
filter_compiler_wrappers(
"KokkosConfigCommon.cmake", relative_root=os.path.join("lib64", "cmake", "Kokkos")
)
@classmethod @classmethod
def get_microarch(cls, target): def get_microarch(cls, target):
"""Get the Kokkos microarch name for a Spack target (spec.target).""" """Get the Kokkos microarch name for a Spack target (spec.target)."""