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):
5252
5353
5454def cpp_flag (compiler ):
55- """Return the -std=c++[11/14] compiler flag.
55+ """Return the -std=c++[11/14/17 ] compiler flag.
5656
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).
5858 """
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!' )
6666
6767
6868class BuildExt (build_ext ):
You can’t perform that action at this time.
0 commit comments