summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2022-08-01 15:51:02 -0700
committerHarmen Stoppels <harmenstoppels@gmail.com>2022-08-17 13:57:13 +0200
commit546c8a3092d370b2b4e5fae186be8521169073fc (patch)
treecb4188415ef3c885a7370b057daafb3bfba8f5c7 /lib
parent913e6043bbadbc8171f28e2d554cf7d43c0035b0 (diff)
downloadspack-546c8a3092d370b2b4e5fae186be8521169073fc.tar.gz
spack-546c8a3092d370b2b4e5fae186be8521169073fc.tar.bz2
spack-546c8a3092d370b2b4e5fae186be8521169073fc.tar.xz
spack-546c8a3092d370b2b4e5fae186be8521169073fc.zip
Add c++14 support flag for xl compiler (#31826)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compilers/xl.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py
index c87f28e78d..9f23e4e954 100644
--- a/lib/spack/spack/compilers/xl.py
+++ b/lib/spack/spack/compilers/xl.py
@@ -73,6 +73,14 @@ class Xl(Compiler):
raise UnsupportedCompilerFlag(self, "the C11 standard", "c11_flag", "< 12.1")
@property
+ def cxx14_flag(self):
+ # .real_version does not have the "y.z" component of "w.x.y.z", which
+ # is required to distinguish whether support is available
+ if self.version >= ver("16.1.1.8"):
+ return "-std=c++14"
+ raise UnsupportedCompilerFlag(self, "the C++14 standard", "cxx14_flag", "< 16.1.1.8")
+
+ @property
def cc_pic_flag(self):
return "-qpic"