def _configure_impl(ctx): _setup_log(ctx) ufid = configureutil.make_ufid(ctx) waf_platform = Utils.unversioned_sys_platform() if waf_platform == 'win32': if '64' in ufid.flags: ctx.options.msvc_targets = 'x64' else: ctx.options.msvc_targets = 'x86' msvc_version = configureutil.get_msvc_version_from_env() if msvc_version: ctx.options.msvc_version = 'msvc %s' % msvc_version else: if 'CXX' in ctx.environ and 'CC' not in ctx.environ: ctx.environ['CC'] = sysutil.get_other_compiler( ctx.environ['CXX'], sysutil.CompilerType.CXX) elif 'CC' in ctx.environ and 'CXX' not in ctx.environ: ctx.environ['CXX'] = sysutil.get_other_compiler( ctx.environ['CC'], sysutil.CompilerType.C) ctx.load('compiler_c') ctx.load('compiler_cxx') cc_ver = ctx.env.CC_VERSION cc_name = ctx.env.COMPILER_CC cxx_ver = ctx.env.CC_VERSION cxx_name = ctx.env.COMPILER_CXX if cxx_name in sysutil.CXX_C_COMP_MAP: exp_c_name = sysutil.CXX_C_COMP_MAP[cxx_name] if exp_c_name != cc_name: ctx.fatal('C compiler and C++ compiler must match. ' 'Expected c compiler: %s' % exp_c_name) if cc_ver != cxx_ver: ctx.fatal('C compiler and C++ compiler must be the same version. ' 'C compiler version: %s, ' 'C++ compiler version: %s' % (cc_ver, cxx_ver)) ctx.load('bdebuild.waf.bdeunittest') effective_uplid, actual_uplid = configureutil.make_uplid(ctx) # If UFID is not set by bde_setwafenv.py or the --ufid flag, use "cpp11" as # the default when appropriate. if (not os.getenv('BDE_WAF_UFID') and (ctx.options.ufid is None) and (ctx.options.cpp_std is None) and (optionsutil.get_default_cpp_std(effective_uplid.comp_type, effective_uplid.comp_ver) == "11")): ufid.flags.add('cpp11') helper = configurehelper.ConfigureHelper(ctx, ufid, effective_uplid, actual_uplid) helper.configure()
def _configure_impl(ctx): _setup_log(ctx) ufid = configureutil.make_ufid(ctx) waf_platform = Utils.unversioned_sys_platform() if waf_platform == 'win32': if '64' in ufid.flags: ctx.options.msvc_targets = 'x64' else: ctx.options.msvc_targets = 'x86' msvc_version = configureutil.get_msvc_version_from_env() if msvc_version: ctx.options.msvc_version = 'msvc %s' % msvc_version else: if 'CXX' in ctx.environ and 'CC' not in ctx.environ: ctx.environ['CC'] = sysutil.get_other_compiler( ctx.environ['CXX'], sysutil.CompilerType.CXX) elif 'CC' in ctx.environ and 'CXX' not in ctx.environ: ctx.environ['CXX'] = sysutil.get_other_compiler( ctx.environ['CC'], sysutil.CompilerType.C) ctx.load('compiler_c') ctx.load('compiler_cxx') cc_ver = ctx.env.CC_VERSION cc_name = ctx.env.COMPILER_CC cxx_ver = ctx.env.CC_VERSION cxx_name = ctx.env.COMPILER_CXX if cxx_name in sysutil.CXX_C_COMP_MAP: exp_c_name = sysutil.CXX_C_COMP_MAP[cxx_name] if exp_c_name != cc_name: ctx.fatal('C compiler and C++ compiler must match. ' 'Expected c compiler: %s' % exp_c_name) if cc_ver != cxx_ver: ctx.fatal('C compiler and C++ compiler must be the same version. ' 'C compiler version: %s, ' 'C++ compiler version: %s' % (cc_ver, cxx_ver)) ctx.load('bdebuild.waf.bdeunittest') effective_uplid, actual_uplid = configureutil.make_uplid(ctx) if (not os.getenv('BDE_WAF_UFID') and (ctx.options.cpp_std is None) and (optionsutil.get_default_cpp_std(effective_uplid.comp_type, effective_uplid.comp_ver) == "11")): ufid.flags.add('cpp11') helper = configurehelper.ConfigureHelper(ctx, ufid, effective_uplid, actual_uplid) helper.configure()
def _configure_impl(ctx): _setup_log(ctx) ufid = configureutil.make_ufid(ctx) waf_platform = Utils.unversioned_sys_platform() if waf_platform == 'win32': if '64' in ufid.flags: ctx.options.msvc_targets = 'x64' else: ctx.options.msvc_targets = 'x86' msvc_version = configureutil.get_msvc_version_from_env() if msvc_version: ctx.options.msvc_version = 'msvc %s' % msvc_version else: if 'CXX' in ctx.environ and 'CC' not in ctx.environ: ctx.environ['CC'] = sysutil.get_other_compiler( ctx.environ['CXX'], sysutil.CompilerType.CXX) elif 'CC' in ctx.environ and 'CXX' not in ctx.environ: ctx.environ['CXX'] = sysutil.get_other_compiler( ctx.environ['CC'], sysutil.CompilerType.C) ctx.load('compiler_c') ctx.load('compiler_cxx') cc_ver = ctx.env.CC_VERSION cc_name = ctx.env.COMPILER_CC cxx_ver = ctx.env.CC_VERSION cxx_name = ctx.env.COMPILER_CXX if cxx_name in sysutil.CXX_C_COMP_MAP: exp_c_name = sysutil.CXX_C_COMP_MAP[cxx_name] if exp_c_name != cc_name: ctx.fatal('C compiler and C++ compiler must match. ' 'Expected c compiler: %s' % exp_c_name) if cc_ver != cxx_ver: ctx.fatal('C compiler and C++ compiler must be the same version. ' 'C compiler version: %s, ' 'C++ compiler version: %s' % (cc_ver, cxx_ver)) ctx.load('bdebuild.waf.bdeunittest') effective_uplid, actual_uplid = configureutil.make_uplid(ctx) helper = configurehelper.ConfigureHelper(ctx, ufid, effective_uplid, actual_uplid) helper.configure()
def _configure_impl(ctx): _setup_log(ctx) ufid = configureutil.make_ufid(ctx) waf_platform = Utils.unversioned_sys_platform() if waf_platform == 'win32': if '64' in ufid.flags: ctx.options.msvc_targets = 'x64' else: ctx.options.msvc_targets = 'x86' msvc_version = configureutil.get_msvc_version_from_env() if msvc_version: ctx.options.msvc_version = 'msvc %s' % msvc_version else: if 'CXX' in ctx.environ and 'CC' not in ctx.environ: ctx.environ['CC'] = sysutil.get_other_compiler( ctx.environ['CXX'], sysutil.CompilerType.CXX) elif 'CC' in ctx.environ and 'CXX' not in ctx.environ: ctx.environ['CXX'] = sysutil.get_other_compiler( ctx.environ['CC'], sysutil.CompilerType.C) ctx.load('compiler_c') ctx.load('compiler_cxx') cc_ver = ctx.env.CC_VERSION cc_name = ctx.env.COMPILER_CC cxx_ver = ctx.env.CC_VERSION cxx_name = ctx.env.COMPILER_CXX if cxx_name in sysutil.CXX_C_COMP_MAP: exp_c_name = sysutil.CXX_C_COMP_MAP[cxx_name] if exp_c_name != cc_name: ctx.fatal('C compiler and C++ compiler must match. ' 'Expected c compiler: %s' % exp_c_name) if cc_ver != cxx_ver: ctx.fatal('C compiler and C++ compiler must be the same version. ' 'C compiler version: %s, ' 'C++ compiler version: %s' % (cc_ver, cxx_ver)) ctx.load('bdebuild.waf.bdeunittest') effective_uplid, actual_uplid = configureutil.make_uplid(ctx) # If UFID is not set by bde_setwafenv.py or the --ufid flag, use "cpp11" as # the default when appropriate. if (not os.getenv('BDE_WAF_UFID') and (ctx.options.ufid is None) and (ctx.options.cpp_std is None) and (optionsutil.get_default_cpp_std( effective_uplid.comp_type, effective_uplid.comp_ver) == "11")): ufid.flags.add('cpp11') # Enable -Werror by default if the compiler is gcc-4.9 and build mode is # not 'opt'. if ctx.options.werror is None: if (effective_uplid.comp_type == 'gcc' and effective_uplid.comp_ver >= '4.9' and 'opt' not in ufid.flags): ctx.options.werror = 'cpp' else: ctx.options.werror = 'none' helper = configurehelper.ConfigureHelper(ctx, ufid, effective_uplid, actual_uplid) helper.configure()