From 546c8a3092d370b2b4e5fae186be8521169073fc Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Mon, 1 Aug 2022 15:51:02 -0700 Subject: Add c++14 support flag for xl compiler (#31826) --- lib/spack/spack/compilers/xl.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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 @@ -72,6 +72,14 @@ class Xl(Compiler): return "-qlanglvl=extc1x" 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" -- cgit v1.2.3-70-g09d2