def configure(conf): # Which mkspec should we use, by default, use the cxx_default # that simply fallbacks to use waf auto detect of compiler etc. mkspec = "cxx_default" if conf.has_tool_option('cxx_mkspec'): mkspec = conf.get_tool_option('cxx_mkspec') conf.msg('Using the mkspec:', mkspec) if mkspec == "cxx_default": conf.load_external_tool('mkspec', mkspec) else: # Find and call the mkspec function on the conf object if hasattr(conf, mkspec): getattr(conf, mkspec)() else: conf.fatal("The mkspec is not available: {0}".format(mkspec)) # Additional flags for C/C++ compiler and linker if conf.has_tool_option('cflags'): conf.env['CFLAGS'] += conf.get_tool_option('cflags').split(';') if conf.has_tool_option('cxxflags'): conf.env['CXXFLAGS'] += conf.get_tool_option('cxxflags').split(';') if conf.has_tool_option('linkflags'): conf.env['LINKFLAGS'] += conf.get_tool_option('linkflags').split(';') # Common flags to be set for C/C++ compiler and linker if conf.has_tool_option('commonflags'): conf.env['CFLAGS'] += conf.get_tool_option('commonflags').split(';') conf.env['CXXFLAGS'] += conf.get_tool_option('commonflags').split(';') conf.env['LINKFLAGS'] += conf.get_tool_option('commonflags').split(';')
def configure(conf): conf.load_external_tool('protobuf', 'wurf_protoc')