-
Notifications
You must be signed in to change notification settings - Fork 47
/
jamroot.jam
163 lines (124 loc) · 4.3 KB
/
jamroot.jam
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
# Main Jamfile for building ASL
path-constant TOP : . ;
import testing ;
import os ;
import feature : feature ;
import set ;
#
# Necessary overrides, I believe, to support building out the widget set in the
# specified OS. Not sure if this is still relevant on Windows anymore.
#
asl_additional_macros = ;
switch [ os.name ]
{
case CYGWIN :
asl_additional_macros = <define>WINVER=0x560 <define>_WIN32_WINNT=0x560 <define>_WIN32_IE=0x560 ;
case NT :
asl_additional_macros = <define>WINVER=0x560 <define>_WIN32_WINNT=0x560 <define>_WIN32_IE=0x560 ;
}
#
# Permits overriding the Boost directory by specifying BOOST_PATH in the OS
# environment table.
#
local boost-path = [ os.environ BOOST_PATH ] ;
if $(boost-path)
{
boost-path = $(boost-path) ;
}
else
{
boost-path = ../boost_libraries ;
}
use-project /boost : $(boost-path) ;
# Set up c++11 support as a feature so it will propagate into the
# boost dependencies
feature.feature cpp11 :
on :
composite optional propagated
;
feature.compose <cpp11>on :
<cxxflags>"-std=c++14 -fconstexpr-depth=1024 -ftemplate-depth=1024"
;
feature.feature libc++ :
on :
composite optional propagated
;
feature.compose <libc++>on :
<cxxflags>"-stdlib=libc++ -std=c++14"
<define>BOOST_NO_CXX11_NUMERIC_LIMITS=1
<linkflags>"-lc++"
;
#
# The overarching set of requirements and settings to build ASL with the
# platform/compiler of your choosing.
#
asl_requirements =
$(asl_additional_macros)
# Definitions
<define>BOOST_ALL_NO_LIB
<define>ADOBE_SERIALIZATION
<define>ADOBE_STD_SERIALIZATION
# Include directories
<include>$(boost-path)
<include>.
# Linker specializations
<link>static,<threading>multi:<define>BOOST_THREAD_USE_LIB
# Threading specializations
<threading>single:<define>BOOST_DISABLE_THREADS
# Clang toolset specializations
<toolset>clang:<cpp11>on
<toolset>clang:<libc++>on
<toolset>clang:<runtime-link>shared
# Darwin (Mac OS X gcc) toolset specializations
<toolset>darwin:<cxxflags>"-Werror -Wall -Wno-trigraphs -Wreturn-type -Wnon-virtual-dtor -Woverloaded-virtual -Wformat -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wunknown-pragmas -Wsign-compare"
<toolset>darwin:<linkflags>"-Xlinker -Y -Xlinker 5"
# GCC toolset specializations
<toolset>gcc:<define>NOMINMAX
<toolset>gcc:<cxxflags>"-fno-strict-aliasing"
<toolset>gcc:<cpp11>on
# GCC debug specializations
<toolset>gcc,<variant>debug:<cxxflags>"-Werror -Wall -Wno-trigraphs -Wreturn-type -Wnon-virtual-dtor -Woverloaded-virtual -Wformat -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wno-unknown-pragmas -Wsign-compare -Wno-parentheses -Wno-unused-local-typedefs -Wno-overloaded-virtual -Wno-unused-function"
# MSVC specializations
<toolset>msvc:<cxxflags>"-DUNICODE -D_UNICODE"
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_WIN32_WINNT=0x400
<toolset>msvc:<define>ADOBE_TEST_MICROSOFT_NO_DEPRECATE=0
# MSVC threading specializations
<toolset>msvc,<threading>multi:<define>USE_WINTHREAD
# MSVC 8 specializations
<toolset>msvc-8.0:<cxxflags>"/W3 /WX /Wp64 /Zc:wchar_t /Zc:forScope"
# MSVC 9 specializations
<toolset>msvc-9.0:<cxxflags>"/W3 /WX /Zc:wchar_t /Zc:forScope"
;
# Set up ASL as a Boost project
project
: requirements
$(asl_requirements)
: default-build
<link>static
<threading>multi
<preserve-test-targets>on
: build-dir
$(TOP)/../built_artifacts
;
# Build ASL as a library
lib asl
: #sources
[ glob source/*.cpp ]
/boost/filesystem
/boost/system
/boost/thread//boost_thread
: #requirements
: #defaults
: #usage requirements
$(asl_requirements)
;
# Explicit requires 'bjam asl' from the command line in order to build ASL
# by itself. Otherwise it won't get built, or will get built only as a
# dependency of another project.
explicit asl ;
# Build and run the tests
use-project /adobe : . ;
build-project test ;
# build-project documentation/examples ;