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.
This commit is contained in:
Gustavo Jose de Sousa 2015-12-10 15:59:00 -02:00 committed by Lucas De Marchi
parent f577c1702c
commit f338b917d0
1 changed files with 5 additions and 4 deletions

View File

@ -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()]