@ -89,7 +89,11 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler):
args = [ ]
args = [ ]
std = options [ ' cpp_std ' ]
std = options [ ' cpp_std ' ]
if std . value != ' none ' :
if std . value != ' none ' :
args . append ( ' -std= ' + std . value )
cpp_std_value = std . value
# Clang 3.2, 3.3, 3.4 only understand -std={c,gnu}++1y and not -std={c,gnu}++14
if version_compare ( self . version , ' >=3.2 ' ) and version_compare ( self . version , ' <3.5 ' ) :
cpp_std_value = cpp_std_value . replace ( ' ++14 ' , ' ++1y ' )
args . append ( ' -std= ' + cpp_std_value )
return args
return args
def get_option_link_args ( self , options ) :
def get_option_link_args ( self , options ) :
@ -155,7 +159,11 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler):
args = [ ]
args = [ ]
std = options [ ' cpp_std ' ]
std = options [ ' cpp_std ' ]
if std . value != ' none ' :
if std . value != ' none ' :
args . append ( ' -std= ' + std . value )
cpp_std_value = std . value
# GCC 4.8 only understands -std={c,gnu}++1y and not -std={c,gnu}++14
if version_compare ( self . version , ' >=4.8 ' ) and version_compare ( self . version , ' <4.9 ' ) :
cpp_std_value = cpp_std_value . replace ( ' ++14 ' , ' ++1y ' )
args . append ( ' -std= ' + cpp_std_value )
if options [ ' cpp_debugstl ' ] . value :
if options [ ' cpp_debugstl ' ] . value :
args . append ( ' -D_GLIBCXX_DEBUG=1 ' )
args . append ( ' -D_GLIBCXX_DEBUG=1 ' )
return args
return args