Bento icon indicating copy to clipboard operation
Bento copied to clipboard

Implement better API to control waf tools from hook script

Open cournape opened this issue 12 years ago • 1 comments

Right now, adding new tools (e.g. c++) requires too much fiddling with waf. We should wrap waf tools to make them more amenable to reuse in bento.

cournape avatar Jun 16 '12 11:06 cournape

In the meantime, in the hook file:

import sys

from bento.commands import hooks

@hooks.post_configure
def post_configure(context):
    if sys.platform == "win32":
        context.waf_context.options.check_cxx_compiler = "msvc"
    else:
        context.waf_context.options.check_cxx_compiler = "g++"
    context.waf_context.load("compiler_cxx")

stefanv avatar Jun 16 '12 17:06 stefanv