RCCL: only build tests when requested (#48387)

This commit is contained in:
Seth R. Johnson 2025-01-04 09:46:15 -05:00 committed by GitHub
parent 0576ef081a
commit fd51f1ce65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -111,7 +111,7 @@ class Rccl(CMakePackage):
]: ]:
depends_on(f"rocm-core@{ver}", when=f"@{ver}") depends_on(f"rocm-core@{ver}", when=f"@{ver}")
depends_on("googletest@1.11.0:", when="@5.3:") depends_on("googletest@1.11.0:", type="test", when="@5.3:")
@classmethod @classmethod
def determine_version(cls, lib): def determine_version(cls, lib):
@ -138,10 +138,10 @@ def cmake_args(self):
args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target")) args.append(self.define_from_variant("AMDGPU_TARGETS", "amdgpu_target"))
if self.spec.satisfies("^cmake@3.21.0:3.21.2"): if self.spec.satisfies("^cmake@3.21.0:3.21.2"):
args.append(self.define("__skip_rocmclang", "ON")) args.append(self.define("__skip_rocmclang", True))
if self.spec.satisfies("@5.3.0:"): if self.spec.satisfies("@5.3.0:"):
args.append(self.define("BUILD_TESTS", "ON")) args.append(self.define("BUILD_TESTS", self.run_tests))
return args return args
def test_unit(self): def test_unit(self):