Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

Implement better API to control waf tools from hook script #109

Open
cournape opened this issue Jun 16, 2012 · 1 comment
Open

Implement better API to control waf tools from hook script #109

cournape opened this issue Jun 16, 2012 · 1 comment
Milestone

Comments

@cournape
Copy link
Owner

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.

@stefanv
Copy link
Collaborator

stefanv commented Jun 16, 2012

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")

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants