summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com>2023-11-21 17:08:02 -0800
committerGitHub <noreply@github.com>2023-11-21 18:08:02 -0700
commit432f5d64e369f8b63cab9ce65ea2e9b9ee5c386d (patch)
tree352c17066a5d7c684c2885bff451ebe4f5ba3468 /lib
parentf2192a48cebbbe926e68bb956e4613626c9d5f32 (diff)
downloadspack-432f5d64e369f8b63cab9ce65ea2e9b9ee5c386d.tar.gz
spack-432f5d64e369f8b63cab9ce65ea2e9b9ee5c386d.tar.bz2
spack-432f5d64e369f8b63cab9ce65ea2e9b9ee5c386d.tar.xz
spack-432f5d64e369f8b63cab9ce65ea2e9b9ee5c386d.zip
Add cxx17_flag to intel.py (#41207)
* Add cxx17_flag to intel.py
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compilers/intel.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py
index 4ec2960525..d4ff7c5ebc 100644
--- a/lib/spack/spack/compilers/intel.py
+++ b/lib/spack/spack/compilers/intel.py
@@ -86,6 +86,14 @@ class Intel(Compiler):
return "-std=c++14"
@property
+ def cxx17_flag(self):
+ # https://www.intel.com/content/www/us/en/developer/articles/news/c17-features-supported-by-c-compiler.html
+ if self.real_version < Version("19"):
+ raise UnsupportedCompilerFlag(self, "the C++17 standard", "cxx17_flag", "< 19")
+ else:
+ return "-std=c++17"
+
+ @property
def c99_flag(self):
if self.real_version < Version("12"):
raise UnsupportedCompilerFlag(self, "the C99 standard", "c99_flag", "< 12")