forked from olsonse/xylose
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJamroot
More file actions
192 lines (163 loc) · 5.12 KB
/
Copy pathJamroot
File metadata and controls
192 lines (163 loc) · 5.12 KB
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# Usage:
#
# bjam [options] [properties] [install|stage]
#
# Builds and installs Xylose.
#
# 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:\Xylose 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 path ; # for getting a better glob
import package ; # used for installing whole package (provides --prefix related
# options )
path-constant TOP : . ;
# For xylose 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 xylose-0.1.2 " ] ;
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 : ../ ;
project /xylose
: requirements
<include>src
<library>/boost//headers
<define>XYLOSE_VERSION=$(VERSION)
: usage-requirements
<include>src
<library>/boost//headers
<define>XYLOSE_VERSION=$(VERSION)
;
alias headers : : : : <include>src ;
alias xml
:
:
:
: <library>/xylose//headers
$(xml2-features)
;
lib xylose
: # sources and required components
src/xylose/power.c
src/xylose/logger.c
[ glob src/xylose/*.cpp ]
: # build requirements
<link>static
<include>src
: # no default build
: #usage requirements
<include>src
;
import path ;
# crude find-appspack routine
if [ path.exists $(TOP)/../third-party/appspack/Jamroot ] {
constant APPSPACK : true ;
} else {
constant APPSPACK : "" ;
}
# crude find-pstreams(redi) routine
if [ path.exists $(TOP)/../third-party/pstreams/Jamroot ] {
constant PSTREAMS : <define>HAVE_PSTREAMS <library>/pstreams//pstreams ;
} else {
local PSTREAMS = "" ;
}
local binaries = ;
if $(APPSPACK) {
exe appspack_pthread
: src/xylose/fit/appspack/appsPack.cpp
: #properties
<library>/xylose//xylose
<library>/xylose//xml
<library>/appspack//appspack
<library>/boost//program_options/<link>static
$(PSTREAMS)
<threading>multi
<toolset>gcc:<linkflags>-pthread
<toolset>gcc:<cflags>-pthread
<toolset>pathscale:<linkflags>-pthread
<toolset>pathscale:<cflags>-pthread
<toolset>intel:<linkflags>-pthread
<toolset>intel:<cflags>-pthread
;
install convenient-copy : appspack_pthread : <location>. ;
binaries = $(binaries) appspack_pthread ;
}
# installation configuration
# options:
install-properties =
<install-no-version-symlinks>on
;
if [ modules.peek : NT ] {
install-properties += <install-default-prefix>C:/Xylose ;
} else if [ modules.peek : UNIX ] {
install-properties += <install-default-prefix>/usr/local ;
}
# the list of libraries to build and install
local libraries = xylose ;
# all headers to install
local all_headers = [ path.glob-tree src : *.h *.hpp *.cpp : .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-docs ;
explicit install ;
# install code allowing --prefix and related command line options
package.install install-code
: $(install-properties)
<install-source-root>$(TOP)/src
: $(binaries)
: $(libraries)
: $(all_headers)
;
explicit install-code ;
# install data allowing --prefix and related command line options
package.install install-docs
: $(install-properties)
<install-source-root>$(TOP)
<install-header-subdir>../share/xylose
:
:
: $(docs)
;
explicit install-docs ;
# install the libs into a staging dir
install stage : $(libraries) ;
explicit stage ;