2
0
mirror of https://github.com/boostorg/json.git synced 2026-01-19 04:12:14 +00:00

bench jamfile cleanup

This commit is contained in:
Dmitry Arkhipov
2024-10-10 11:52:13 +03:00
parent ec3e05069b
commit 3b9a395f43
3 changed files with 14 additions and 29 deletions

View File

@@ -7,17 +7,14 @@
# Official repository: https://github.com/boostorg/json
#
import bench ;
import boost-json-bench ;
import common ;
import feature ;
import notfile ;
import os ;
import path ;
import property ;
path-constant HERE : . ;
.BENCH_FILES = [ os.environ BENCH_FILES ] ;
import toolset ;
local has_nlohmann_json = [
glob lib/nlohmann/single_include/nlohmann/json.hpp ] ;
@@ -46,16 +43,12 @@ install bench-local : bench : <location>. <hardcode-dll-paths>true ;
explicit bench-local ;
always bench-local ;
local bench-files = [ glob $(HERE)/data/*.json ] ;
local bench-files = [ glob-tree-ex data : *.json ] ;
notfile run : @run-bench : bench : : <bench.file>$(bench-files) ;
explicit run ;
rule run-bench ( target : sources * : props * )
{
local flags = [ property.select flags : $(props) ] ;
flags += [ property.select bench.option : $(props) ] ;
FLAGS on $(target) = $(flags:G=) ;
local launcher = [ property.select bench.launcher : $(props) ] ;
if $(launcher)
{
@@ -67,21 +60,13 @@ rule run-bench ( target : sources * : props * )
launcher = "" ;
}
LAUNCHER on $(target) = $(launcher) ;
local files = [ property.select bench.file : $(props) ] ;
FILES on $(target) = $(files:G=) ;
local dir = [ on $(target) return $(LOCATE) ] ;
if $(dir)
{
dir = [ path.make $(dir) ] ;
dir = $(dir)/$(target:G=) ;
common.MkDir $(dir) ;
DEPENDS $(target) : $(dir) ;
}
}
actions run-bench
actions run-bench bind FILES
{
$(LAUNCHER)$(>) $(FLAGS) $(FILES)
$(LAUNCHER) $(>) $(FLAGS) $(FILES)
}
toolset.flags $(__name__).run-bench FLAGS : <flag> ;
toolset.flags $(__name__).run-bench FLAGS : <bench.option> ;
toolset.flags $(__name__).run-bench FILES : <bench.file> ;

View File

@@ -1,5 +0,0 @@
import feature ;
feature.feature bench.option : : free optional ;
feature.feature bench.launcher : : free optional ;
feature.feature bench.file : : free optional ;

View File

@@ -0,0 +1,5 @@
import feature ;
feature.feature bench.file : : free dependency ;
feature.feature bench.launcher : : free incidental optional ;
feature.feature bench.option : : free incidental ;