From f338b917d06679d8628a56d923ae9a5fc51d369d Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Thu, 10 Dec 2015 15:59:00 -0200 Subject: [PATCH] waf: gbenchmark: get build node from variant If there's no variant configuration, then cfg.variant will be '', which will make bldnode be cfg.bldnode. Thus, this patch prepare gbenchmark build for variant builds and doesn't break the current build. --- Tools/ardupilotwaf/gbenchmark.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Tools/ardupilotwaf/gbenchmark.py b/Tools/ardupilotwaf/gbenchmark.py index ab5f232789..ee8a24f012 100644 --- a/Tools/ardupilotwaf/gbenchmark.py +++ b/Tools/ardupilotwaf/gbenchmark.py @@ -35,13 +35,14 @@ def configure(cfg): if env.GBENCHMARK_CMAKE_GENERATOR: env.GBENCHMARK_GENERATOR_OPTION = '-G%s' % env.GBENCHMARK_CMAKE_GENERATOR - prefix_node = cfg.bldnode.make_node('gbenchmark') - my_build_node = cfg.bldnode.make_node('gbenchmark_build') + bldnode = cfg.bldnode.make_node(cfg.variant) + prefix_node = bldnode.make_node('gbenchmark') + my_build_node = bldnode.make_node('gbenchmark_build') my_src_node = cfg.srcnode.find_dir('modules/gbenchmark') - env.GBENCHMARK_PREFIX_REL = prefix_node.path_from(cfg.bldnode) + env.GBENCHMARK_PREFIX_REL = prefix_node.path_from(bldnode) env.GBENCHMARK_BUILD = my_build_node.abspath() - env.GBENCHMARK_BUILD_REL = my_build_node.path_from(cfg.bldnode) + env.GBENCHMARK_BUILD_REL = my_build_node.path_from(bldnode) env.GBENCHMARK_SRC = my_src_node.abspath() env.INCLUDES_GBENCHMARK = [prefix_node.make_node('include').abspath()]