Address legion package build issue on macOS with apple-clang-12 (#28241)

* Added C++ standard variant as a primary work-around for issues with apple-clang 12.x
but could also be helpful for broader uses.
This commit is contained in:
Pat McCormick 2022-01-05 11:20:24 -07:00 committed by GitHub
parent f34598214b
commit 52cfd17917
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,6 +62,13 @@ class Legion(CMakePackage):
depends_on('papi', when='+papi')
depends_on('zlib', when='+zlib')
# A C++ standard variant to work-around some odd behaviors with apple-clang
# but this might be helpful for other use cases down the road. Legion's
# current development policy is C++11 or greater so we capture that aspect
# here.
cpp_stds = ["11", "14", "17", "20"]
variant('cxxstd', default="11", values=cpp_stds, multi=False)
# TODO: Need a AMD/HIP variant to match support landing in 21.03.0.
# Network transport layer: the underlying data transport API should be used for
@ -201,7 +208,10 @@ def validate_gasnet_root(value):
def cmake_args(self):
spec = self.spec
cmake_cxx_flags = []
options = []
from_variant = self.define_from_variant
options = [
from_variant("CMAKE_CXX_STANDARD", "cxxstd")
]
if 'network=gasnet' in spec:
options.append('-DLegion_NETWORKS=gasnetex')