if conf.options.force_cpp11:
conf.env.append_value('CXXFLAGS', ['-std=c++11', '-DBOOST_NO_CXX11_SCOPED_ENUMS'])
- gcc = conf.env['CC_VERSION']
- if int(gcc[0]) >= 4 and int(gcc[1]) > 1:
- conf.env.append_value('CXXFLAGS', ['-Wno-unused-result'])
- have_c11 = int(gcc[0]) >= 4 and int(gcc[1]) >= 8 and int(gcc[2]) >= 1
+ if conf.env['CXX_NAME'] == 'gcc':
+ gcc = conf.env['CC_VERSION']
+ if int(gcc[0]) >= 4 and int(gcc[1]) > 1:
+ conf.env.append_value('CXXFLAGS', ['-Wno-unused-result'])
+ if int(gcc[0]) >= 9:
+ conf.env.append_value('CXXFLAGS', ['-Wno-deprecated-copy'])
+ have_c11 = int(gcc[0]) >= 4 and int(gcc[1]) >= 8 and int(gcc[2]) >= 1
+ else:
+ have_c11 = False
if conf.options.enable_debug:
conf.env.append_value('CXXFLAGS', ['-g', '-DDCPOMATIC_DEBUG', '-fno-omit-frame-pointer'])
conf.env.append_value('CXXFLAGS', '-DLINUX_LOCALE_PREFIX="%s/share/locale"' % conf.env['INSTALL_PREFIX'])
conf.env.append_value('CXXFLAGS', '-DLINUX_SHARE_PREFIX="%s/share/dcpomatic2"' % conf.env['INSTALL_PREFIX'])
conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_LINUX')
- conf.env.append_value('CXXFLAGS', ['-Wlogical-op', '-Wcast-align', '-Wno-deprecated-copy'])
+ conf.env.append_value('CXXFLAGS', ['-Wlogical-op', '-Wcast-align'])
if not conf.env.DISABLE_GUI:
conf.check_cfg(package='gtk+-2.0', args='--cflags --libs', uselib_store='GTK', mandatory=True)