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:
parent
d65b9ad195
commit
2e2c06121a
1 changed files with 11 additions and 0 deletions
|
@ -26,6 +26,9 @@ class LlvmOpenmpOmpt(CMakePackage):
|
||||||
variant('standalone', default=False,
|
variant('standalone', default=False,
|
||||||
description="Build llvm openmpi ompt library as a \
|
description="Build llvm openmpi ompt library as a \
|
||||||
stand alone entity.")
|
stand alone entity.")
|
||||||
|
# variant for building libomptarget
|
||||||
|
variant('libomptarget', default=True,
|
||||||
|
description='Enable building libomptarget for offloading')
|
||||||
|
|
||||||
variant('build_type', default='Release',
|
variant('build_type', default='Release',
|
||||||
description='CMake build type',
|
description='CMake build type',
|
||||||
|
@ -34,6 +37,9 @@ class LlvmOpenmpOmpt(CMakePackage):
|
||||||
depends_on('cmake@2.8:', type='build')
|
depends_on('cmake@2.8:', type='build')
|
||||||
depends_on('llvm', when='~standalone')
|
depends_on('llvm', when='~standalone')
|
||||||
depends_on('ninja@1.5:', type='build')
|
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'
|
generator = 'Ninja'
|
||||||
|
|
||||||
|
@ -61,6 +67,11 @@ def cmake_args(self):
|
||||||
cmake_args.extend(
|
cmake_args.extend(
|
||||||
['-DLIBOMP_OMP_VERSION=50'])
|
['-DLIBOMP_OMP_VERSION=50'])
|
||||||
|
|
||||||
|
# Disable support for libomptarget
|
||||||
|
if '~libomptarget' in self.spec:
|
||||||
|
cmake_args.extend(
|
||||||
|
['-DOPENMP_ENABLE_LIBOMPTARGET=OFF'])
|
||||||
|
|
||||||
return cmake_args
|
return cmake_args
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in a new issue