llvm-openmp-ompt: Additional dependencies and adding variant (#11266)

* llvm-openmp-ompt: Additional dependencies and adding variant for disabling building libomptarget

* Flake8 fixes
This commit is contained in:
Brian Homerding 2020-08-22 14:23:04 -05:00 committed by GitHub
parent d65b9ad195
commit 2e2c06121a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,9 @@ class LlvmOpenmpOmpt(CMakePackage):
variant('standalone', default=False,
description="Build llvm openmpi ompt library as a \
stand alone entity.")
# variant for building libomptarget
variant('libomptarget', default=True,
description='Enable building libomptarget for offloading')
variant('build_type', default='Release',
description='CMake build type',
@ -34,6 +37,9 @@ class LlvmOpenmpOmpt(CMakePackage):
depends_on('cmake@2.8:', type='build')
depends_on('llvm', when='~standalone')
depends_on('ninja@1.5:', type='build')
depends_on('perl@5.22.0:', type='build')
depends_on('libelf', when='+libomptarget')
depends_on('libffi', when='+libomptarget')
generator = 'Ninja'
@ -61,6 +67,11 @@ def cmake_args(self):
cmake_args.extend(
['-DLIBOMP_OMP_VERSION=50'])
# Disable support for libomptarget
if '~libomptarget' in self.spec:
cmake_args.extend(
['-DOPENMP_ENABLE_LIBOMPTARGET=OFF'])
return cmake_args
@property