Add OpenMP flag for Apple Clang (#12049)

This commit is contained in:
Adam J. Stewart 2019-07-20 15:40:36 -05:00 committed by Todd Gamblin
parent a2cb26f520
commit 7d954720ff
2 changed files with 3 additions and 5 deletions

View File

@ -83,10 +83,7 @@ def is_apple(self):
@property
def openmp_flag(self):
if self.is_apple:
raise UnsupportedCompilerFlag(self,
"OpenMP",
"openmp_flag",
"Xcode {0}".format(self.version))
return "-Xpreprocessor -fopenmp"
else:
return "-fopenmp"

View File

@ -219,7 +219,8 @@ def test_clang_flags():
supported_flag_test("pic_flag", "-fPIC", "gcc@4.0")
# Apple Clang.
unsupported_flag_test("openmp_flag", "clang@2.0.0-apple")
supported_flag_test(
"openmp_flag", "-Xpreprocessor -fopenmp", "clang@2.0.0-apple")
unsupported_flag_test("cxx11_flag", "clang@2.0.0-apple")
supported_flag_test("cxx11_flag", "-std=c++11", "clang@4.0.0-apple")
unsupported_flag_test("cxx14_flag", "clang@5.0.0-apple")