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 @property
def openmp_flag(self): def openmp_flag(self):
if self.is_apple: if self.is_apple:
raise UnsupportedCompilerFlag(self, return "-Xpreprocessor -fopenmp"
"OpenMP",
"openmp_flag",
"Xcode {0}".format(self.version))
else: else:
return "-fopenmp" return "-fopenmp"

View File

@ -219,7 +219,8 @@ def test_clang_flags():
supported_flag_test("pic_flag", "-fPIC", "gcc@4.0") supported_flag_test("pic_flag", "-fPIC", "gcc@4.0")
# Apple Clang. # 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") unsupported_flag_test("cxx11_flag", "clang@2.0.0-apple")
supported_flag_test("cxx11_flag", "-std=c++11", "clang@4.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") unsupported_flag_test("cxx14_flag", "clang@5.0.0-apple")