Skip to content

Commit 3b9a395

Browse files
committed
bench jamfile cleanup
1 parent ec3e050 commit 3b9a395

File tree

3 files changed

+14
-29
lines changed

3 files changed

+14
-29
lines changed

bench/Jamfile

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@
77
# Official repository: https://github.com/boostorg/json
88
#
99

10-
import bench ;
10+
import boost-json-bench ;
1111
import common ;
1212
import feature ;
1313
import notfile ;
1414
import os ;
1515
import path ;
1616
import property ;
17-
18-
path-constant HERE : . ;
19-
20-
.BENCH_FILES = [ os.environ BENCH_FILES ] ;
17+
import toolset ;
2118

2219
local has_nlohmann_json = [
2320
glob lib/nlohmann/single_include/nlohmann/json.hpp ] ;
@@ -46,16 +43,12 @@ install bench-local : bench : <location>. <hardcode-dll-paths>true ;
4643
explicit bench-local ;
4744
always bench-local ;
4845

49-
local bench-files = [ glob $(HERE)/data/*.json ] ;
46+
local bench-files = [ glob-tree-ex data : *.json ] ;
5047
notfile run : @run-bench : bench : : <bench.file>$(bench-files) ;
5148
explicit run ;
5249

5350
rule run-bench ( target : sources * : props * )
5451
{
55-
local flags = [ property.select flags : $(props) ] ;
56-
flags += [ property.select bench.option : $(props) ] ;
57-
FLAGS on $(target) = $(flags:G=) ;
58-
5952
local launcher = [ property.select bench.launcher : $(props) ] ;
6053
if $(launcher)
6154
{
@@ -67,21 +60,13 @@ rule run-bench ( target : sources * : props * )
6760
launcher = "" ;
6861
}
6962
LAUNCHER on $(target) = $(launcher) ;
70-
71-
local files = [ property.select bench.file : $(props) ] ;
72-
FILES on $(target) = $(files:G=) ;
73-
74-
local dir = [ on $(target) return $(LOCATE) ] ;
75-
if $(dir)
76-
{
77-
dir = [ path.make $(dir) ] ;
78-
dir = $(dir)/$(target:G=) ;
79-
common.MkDir $(dir) ;
80-
DEPENDS $(target) : $(dir) ;
81-
}
8263
}
8364

84-
actions run-bench
65+
actions run-bench bind FILES
8566
{
86-
$(LAUNCHER)$(>) $(FLAGS) $(FILES)
67+
$(LAUNCHER) $(>) $(FLAGS) $(FILES)
8768
}
69+
70+
toolset.flags $(__name__).run-bench FLAGS : <flag> ;
71+
toolset.flags $(__name__).run-bench FLAGS : <bench.option> ;
72+
toolset.flags $(__name__).run-bench FILES : <bench.file> ;

bench/bench.jam

Lines changed: 0 additions & 5 deletions
This file was deleted.

bench/boost-json-bench.jam

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import feature ;
2+
3+
feature.feature bench.file : : free dependency ;
4+
feature.feature bench.launcher : : free incidental optional ;
5+
feature.feature bench.option : : free incidental ;

0 commit comments

Comments
 (0)