summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/legion/package.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py
index fe13d19736..fa62531934 100644
--- a/var/spack/repos/builtin/packages/legion/package.py
+++ b/var/spack/repos/builtin/packages/legion/package.py
@@ -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 @@ class Legion(CMakePackage):
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')