comgr: disable hip compile test from /opt/rocm (#20330)

This commit is contained in:
Mark W. Krentel 2020-12-15 06:55:45 -06:00 committed by GitHub
parent d67ca265a3
commit d6bfc104bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,11 @@
diff -Naurb ROCm-CompilerSupport-rocm-3.10.0.orig/lib/comgr/test/CMakeLists.txt ROCm-CompilerSupport-rocm-3.10.0/lib/comgr/test/CMakeLists.txt
--- ROCm-CompilerSupport-rocm-3.10.0.orig/lib/comgr/test/CMakeLists.txt 2020-09-16 14:17:12.000000000 -0500
+++ ROCm-CompilerSupport-rocm-3.10.0/lib/comgr/test/CMakeLists.txt 2020-12-14 10:11:56.609584283 -0600
@@ -120,7 +120,6 @@
add_comgr_test(include_subdirectory_test)
add_comgr_test(options_test)
# Test : Compile HIP only if HIP-Clang is installed.
-find_package(hip CONFIG PATHS /opt/rocm/hip QUIET)
if (DEFINED HIP_COMPILER AND "${HIP_COMPILER}" STREQUAL "clang")
add_comgr_test(compile_hip_test)
add_comgr_test(compile_hip_test_in_process)

View File

@ -24,13 +24,20 @@ class Comgr(CMakePackage):
variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type')
# Disable the hip compile tests. Spack should not be using
# /opt/rocm, and this breaks the build when /opt/rocm exists.
patch('hip-tests.patch')
depends_on('cmake@3.2.0:', type='build', when='@:3.8.99')
depends_on('cmake@3.13.4:', type='build', when='@3.9.0:')
depends_on('zlib', type='link')
depends_on('z3', type='link')
depends_on('ncurses', type='link')
depends_on('cmake@3:', type='build')
for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0']:
depends_on('llvm-amdgpu@' + ver, type='build', when='@' + ver)
depends_on('rocm-device-libs@' + ver, type='build', when='@' + ver)
depends_on('rocm-cmake@' + ver, type='build', when='@' + ver)
root_cmakelists_dir = 'lib/comgr'
root_cmakelists_dir = join_path('lib', 'comgr')