-
Notifications
You must be signed in to change notification settings - Fork 11
/
Jamroot
69 lines (56 loc) · 1.72 KB
/
Jamroot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#
# Copyright (C) 2013 Mateusz Loskot <[email protected]>
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy
# at http://www.boost.org/LICENSE_1_0.txt)
#
import notfile
import os ;
# Configure dependencies
local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;
if $(BOOST_ROOT)
{
use-project /boost : $(BOOST_ROOT) ;
}
local JSON_SPIRIT_ROOT = [ os.environ JSON_SPIRIT_ROOT ] ;
if $(JSON_SPIRIT_ROOT)
{
use-project /json_spirit : $(JSON_SPIRIT_ROOT) ;
}
local RAPIDJSON_ROOT = [ os.environ RAPIDJSON_ROOT ] ;
local QT_ROOT = [ os.environ QTDIR ] ;
if $(QT_ROOT)
{
using qt5 : $(QT_ROOT) ;
}
# Declare targets for dependencies
lib jsoncpplib : : <name>jsoncpp : : <include>/usr/include/jsoncpp ;
# Declare project
project json_benchmark
:
requirements
<include>.
<toolset>clang:<cxxflags>-std=c++11
<toolset>gcc:<cxxflags>-std=c++0x
<toolset>gcc:<threading>multi
<toolset>gcc:<cxxflags>-ftemplate-depth=300
<toolset>msvc:<cxxflags>/wd4996
<use>/boost//headers
;
# Declare executable targets of benchmarking programs
rule bexe ( sources + : requirements * : target-name ? : default-build * )
{
target-name ?= $(sources[1]:D=:S=) ;
exe $(target-name) : $(sources) : $(requirements) : $(default-build) ;
}
bexe benchmark_spirit.cpp /json_spirit//json ;
bexe benchmark_rapidjson.cpp : <include>$(RAPIDJSON_ROOT)/include ;
bexe benchmark_jsoncpp.cpp jsoncpplib ;
if $(QT_ROOT)
{
exe benchmark_qjsondoc : benchmark_qjsondoc.cpp /qt5//QtCore ;
}
# TODO: find out how to run all programs after build
#actions run-benchmark { $(>[1]) ; }
#notfile benchmark_rapidjson-run : @run-benchmark : benchmark_rapidjson ;