-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jamroot
167 lines (145 loc) · 4.95 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# Usage:
#
# bjam [options] [properties] [install|stage]
#
# Builds and installs CHIMP.
#
# Targets and Related Options:
#
# install Install headers and compiled library files to the
# ======= configured locations (below).
#
# --prefix=<PREFIX> Install architecture independent files here.
# Default; C:\Chimp on Win32
# Default; /usr/local on Unix. Linux, etc.
#
# --exec-prefix=<EPREFIX> Install architecture dependent files here.
# Default; <PREFIX>
#
# --libdir=<DIR> Install library files here.
# Default; <EPREFIX>/lib
#
# --includedir=<HDRDIR> Install header files here.
# Default; <PREFIX>/include
#
# stage Build and install only compiled library files
# ===== to the ./stage directory.
#
# Other Options:
#
# --build-dir=DIR Build in this location instead of building
# within the distribution tree. Recommended!
#
# --help This message.
#
# Properties:
#
# toolset=toolset Indicates the toolset to build with.
#
# variant=debug|release Select the build variant
#
# link=static|shared Whether to build static or shared libraries
#
# threading=single|multi Whether to build single or multithreaded binaries
#
# runtime-link=static|shared
# Whether to link to static or shared C and C++ runtime.
#
import mpi ; # for converting xml2-config output to features.
import testing ; # for unit tests
import path ; # for getting a better glob
import package ; # used for installing whole package (provides --prefix related
# options )
path-constant TOP : . ;
# For chimp we did not yet use signed/annotated tags, therefore the --tags
# option for describe
constant VERSION : [ SHELL "printf `cd $(TOP); git describe --tags 2> /dev/null` || printf chimp-0.1.0 " ] ;
local xml2-features = [ mpi.cmdline_to_features [ SHELL "printf '%s ' compiler `xml2-config --cflags --libs`" ] ] ;
# root-project loads boost and others...
use-project /root-project : ../ ;
path-constant CHIMP_PARTICLEDB_XML : $(TOP)/data/particledb.xml ;
project /chimp
: requirements
<include>src
<library>/xylose//headers
<library>/boost//headers
$(xml2-features)
<define>CHIMP_PARTICLEDB_XML=$(CHIMP_PARTICLEDB_XML)
<define>CHIMP_VERSION=\\\"$(VERSION)\\\"
: usage-requirements
<include>src
<library>/xylose//headers
<library>/boost//headers
$(xml2-features)
<define>CHIMP_PARTICLEDB_XML=$(CHIMP_PARTICLEDB_XML)
<define>CHIMP_VERSION=\\\"$(VERSION)\\\"
;
alias headers : : : : <include>src ;
lib particledb :
src/chimp/physical_calc.cpp
src/chimp/interaction/filter/Base.cpp
src/chimp/interaction/cross_section/DATA.cpp
src/chimp/interaction/cross_section/Constant.cpp
src/chimp/interaction/cross_section/detail/VHSInfo.cpp
src/chimp/interaction/cross_section/detail/LotzDetails.cpp
src/chimp/interaction/model/detail/vss_helpers.cpp
: <link>static # build requirements
<library>/physical//calc
: # no default build
: <library>/boost//regex/<link>static
<library>/physical//calc
<library>/xylose//xylose
;
# installation configuration
# options:
install-properties =
<install-no-version-symlinks>on
;
if [ modules.peek : NT ] {
install-properties += <install-default-prefix>C:/Chimp ;
} else if [ modules.peek : UNIX ] {
install-properties += <install-default-prefix>/usr/local ;
}
# the list of libraries to build and install
local libraries = particledb ;
# all headers to install
local all_headers = [ path.glob-tree src : *.h *.cpp : .svn __namespace__.h ] ;
# data to install
local data = [ path.glob-tree data : *.xml : .svn ] ;
# docs to install
local docs = [ path.glob-tree docs/api/html docs/api/latex : * : .svn ] ;
# Complete install allowing --prefix and related command line options
alias install : install-code install-data install-docs ;
explicit install ;
# install code allowing --prefix and related command line options
package.install install-code
: $(install-properties)
<install-source-root>$(TOP)/src
:
: $(libraries)
: $(all_headers)
;
explicit install-code ;
# install data allowing --prefix and related command line options
package.install install-data
: $(install-properties)
<install-source-root>$(TOP)
<install-header-subdir>../share/chimp
:
:
: $(data)
;
explicit install-data ;
# install data allowing --prefix and related command line options
package.install install-docs
: $(install-properties)
<install-source-root>$(TOP)
<install-header-subdir>../share/chimp
:
:
: $(docs)
;
explicit install-docs ;
# install the libs into a staging dir
install stage : $(libraries) ;
explicit stage ;