diff --git a/var/spack/repos/builtin/packages/tasmanian/package.py b/var/spack/repos/builtin/packages/tasmanian/package.py index e2b4ab3973..a37ff06a65 100644 --- a/var/spack/repos/builtin/packages/tasmanian/package.py +++ b/var/spack/repos/builtin/packages/tasmanian/package.py @@ -192,7 +192,43 @@ def test(self): # using the tests copied from /share/Tasmanian/testing cmake_dir = self.test_suite.current_test_cache_dir.testing - if not self.run_test(cmake_bin, options=[cmake_dir], purpose="Generate the Makefile"): + options = [ + cmake_dir, + ] + if "+rocm" in self.spec: + options.append( + "-DAMDDeviceLibs_DIR=" + + join_path(self.spec["llvm-amdgpu"].prefix, "lib", "cmake", "AMDDeviceLibs") + ) + options.append( + "-Damd_comgr_DIR=" + + join_path(self.spec["comgr"].prefix, "lib", "cmake", "amd_comgr") + ) + options.append( + "-Dhsa-runtime64_DIR=" + + join_path(self.spec["hsa-rocr-dev"].prefix, "lib", "cmake", "hsa-runtime64") + ) + options.append( + "-DHSA_HEADER=" + join_path(self.spec["hsa-rocr-dev"].prefix, "include") + ) + options.append( + "-DCMAKE_INCLUDE_PATH=" + + join_path(self.spec["hsa-rocr-dev"].prefix, "include", "hsa") + ) + options.append( + "-Drocblas_DIR=" + + join_path(self.spec["rocblas"].prefix, "lib", "cmake", "rocblas") + ) + options.append( + "-Drocsparse_DIR=" + + join_path(self.spec["rocsparse"].prefix, "lib", "cmake", "rocsparse") + ) + options.append( + "-Drocsolver_DIR=" + + join_path(self.spec["rocsolver"].prefix, "lib", "cmake", "rocsolver") + ) + + if not self.run_test(cmake_bin, options=options, purpose="Generate the Makefile"): tty.msg("Skipping tasmanian test: failed to generate Makefile") return