Implement better API to control waf tools from hook script
cournape opened this issue · 1 comments
cournape commented
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 commented
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")