File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -52,17 +52,17 @@ def has_flag(compiler, flagname):
52
52
53
53
54
54
def cpp_flag (compiler ):
55
- """Return the -std=c++[11/14] compiler flag.
55
+ """Return the -std=c++[11/14/17 ] compiler flag.
56
56
57
- The c++14 is prefered over c++11 (when it is available).
57
+ The newer version is prefered over c++11 (when it is available).
58
58
"""
59
- if has_flag ( compiler , '-std=c++14' ):
60
- return '-std=c++14'
61
- elif has_flag ( compiler , '-std=c++11' ) :
62
- return '-std=c++11'
63
- else :
64
- raise RuntimeError ('Unsupported compiler -- at least C++11 support '
65
- 'is needed!' )
59
+ flags = [ '-std=c++17' , '-std=c++14' , '-std=c++11' ]
60
+
61
+ for flag in flags :
62
+ if has_flag ( compiler , flag ): return flag
63
+
64
+ raise RuntimeError ('Unsupported compiler -- at least C++11 support '
65
+ 'is needed!' )
66
66
67
67
68
68
class BuildExt (build_ext ):
You can’t perform that action at this time.
0 commit comments