Update the change to add gomp compatibity to llvm-openmp. (#17400)

* Update the change to add gomp compatibity to llvm-openmp.

* Update the change to add gomp compatibity to llvm-openmp using append instead of extend.

* Fix flake8 issue.

Co-authored-by: Jim Galarowicz <jgalarowicz@newmexicoconsortium.org>
This commit is contained in:
Jim Galarowicz 2020-08-13 15:41:20 -05:00 committed by GitHub
parent 8398265638
commit c0342e4152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

12
var/spack/repos/builtin/packages/llvm-openmp/package.py Normal file → Executable file
View File

@ -18,10 +18,20 @@ class LlvmOpenmp(CMakePackage):
depends_on('cmake@2.8:', type='build')
variant('multicompat', default=False,
description="Support gomp and the Intel openMP runtime library.")
def cmake_args(self):
# Disable LIBOMP_INSTALL_ALIASES, otherwise the library is installed as
# libgomp alias which can conflict with GCC's libgomp.
return ['-DLIBOMP_INSTALL_ALIASES=OFF']
cmake_args = [
'-DLIBOMP_INSTALL_ALIASES=OFF'
]
# Add optional support for both Intel and gcc compilers
if self.spec.satisfies('+multicompat'):
cmake_args.append('-DKMP_GOMP_COMPAT=1')
return cmake_args
@property
def libs(self):