Skip to content

Commit

Permalink
bench jamfile cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
grisumbras committed Oct 10, 2024
1 parent 7470212 commit 9066ed0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 29 deletions.
33 changes: 9 additions & 24 deletions bench/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ;
Expand Down Expand Up @@ -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)
{
Expand All @@ -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> ;
5 changes: 0 additions & 5 deletions bench/bench.jam

This file was deleted.

5 changes: 5 additions & 0 deletions bench/boost-json-bench.jam
Original file line number Diff line number Diff line change
@@ -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 ;

0 comments on commit 9066ed0

Please sign in to comment.