forked from ProteoWizard/pwiz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext-boost.jam
811 lines (745 loc) · 31.5 KB
/
ext-boost.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
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
#
# $Id$
#
#~ Copyright Redshift Software, Inc. 2006.
#~ 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)
### Support for building Boost <http://www.boost.org/> externally.
### Targets:
### /ext/boost//boost
### /ext/boost//thread
### /ext/boost//regex
### /ext/boost//interprocess
### /ext/boost//filesystem
### /ext/boost//iostreams
### /ext/boost//program_options
### /ext/boost//serialization
import extension ;
import property ;
import project ;
import feature ;
import set ;
import stage ;
import common ;
import path ;
import type ;
import targets ;
import generators ;
import "class" : new ;
import os ;
import tar ;
import regex ;
import errors ;
extension.declare boost ;
path-constant THIS_PATH : ../../libraries ;
.boost-version = ;
.boost-src-location = ;
feature.feature boost-filesystem-version : default 2 3 : composite link-incompatible propagated ;
feature.feature boost-iostreams-zlib : on off : composite link-incompatible propagated ;
feature.feature boost-iostreams-bzip2 : off on : composite link-incompatible propagated ;
feature.feature zlib-src-location : : free path ;
feature.feature boost-interprocess : : free ;
feature.feature boost-asio : : free ;
rule boost-tag ( name : type ? : property-set )
{
return [ common.format-name
boost_ <base> <toolset> <threading> <runtime> <version:boost-version>
: $(name) : $(type) : $(property-set) ] ;
}
# warning: _SECURE_SCL_THROWS is deprecated
# checked iterators throw instead of crash
rule secure-scl-throws ( properties * )
{
if <toolset>msvc in $(properties) &&
! ( <toolset-msvc:version>11.0 in $(properties) ) &&
! ( <toolset-msvc:version>12.0 in $(properties) ) &&
! ( <toolset-msvc:version>13.0 in $(properties) ) &&
! ( <toolset-msvc:version>14.0 in $(properties) ) &&
! ( <toolset-msvc:version>14.1 in $(properties) ) &&
! ( <toolset-msvc:version>14.2 in $(properties) )
{
return <define>_SILENCE_DEPRECATION_OF_SECURE_SCL_THROWS
<define>_SECURE_SCL_THROWS=1 ;
}
}
rule filesystem-requirements ( properties * )
{
local location = $(.boost-src-location) ;
local result ;
local sources = [ path.glob $(location)/libs/filesystem/src : *.cpp ] ;
result += <source>$(sources) ;
return $(result) ;
}
rule log-platform-specific-sources ( properties * )
{
local location = $(.boost-src-location) ;
if <target-os>windows in $(properties)
{
return <source>$(location)/libs/log/src/windows/debug_output_backend.cpp
<source>$(location)/libs/log/src/windows/light_rw_mutex.cpp ;
}
}
# TODO: parse version from version.hpp file
rule init ( version : location : options * )
{
if ! $(.initialized)
{
.initialized = true ;
local version-tokens = [ regex.split $(version) \\. ] ;
local boost-basename = "boost_$(version-tokens:J=_)" ;
if [ path.exists $(location:D)/$(boost-basename).tar.bz2 ]
{
# extract boost tarball
tar.extract
# tar filepath
$(boost-basename).tar.bz2
: # include patterns
$(boost-basename)/boost*.?pp
$(boost-basename)/boost*.h
$(boost-basename)/libs*.?pp
: # requirements
<location>.
: # usage-requirements
: check-last-file-only
;
}
else if ! [ path.exists $(location) ]
{
errors.user-error "Boost source tree not found at $(location)" ;
}
local zlib-src-location = [ feature.get-values <zlib-src-location> : $(options) ] ;
zlib-src-location ?= $(location)/../zlib-1.2.3 ;
path-constant ZLIB_SOURCE : $(zlib-src-location[1]) ;
using ext-zlib : 1.2.3 : $(ZLIB_SOURCE) ;
.boost-src-location = $(location) ;
.boost-version = $(version) ;
local requirements =
[ extension.refine boost $(version) : <tag>@boost-tag $(options) ]
[ extension.static-with-fpic ]
$(options)
<toolset>msvc:<define>WIN32
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>BOOST_USE_WINAPI_VERSION=0x0501
<toolset>msvc,<toolset-msvc:version>11.0:<define>_HAS_TR1
<toolset>msvc,<toolset-msvc:version>12.0:<define>_HAS_TR1
<toolset>msvc,<toolset-msvc:version>14.0:<define>_HAS_TR1
<toolset>msvc,<toolset-msvc:version>14.1:<define>_HAS_TR1
<toolset>msvc,<toolset-msvc:version>14.2:<define>_HAS_TR1
<link>shared:<define>BOOST_ALL_DYN_LINK=1
<link>static:<define>BOOST_ALL_STATIC_LINK=1
<warnings>off
<conditional>@secure-scl-throws
;
lib pthread : : <name>pthread <link>shared :
: <toolset>gcc:<linkflags>-pthread # sometimes segfaults when not defined -- dk
;
explicit pthread ;
local regex_pthread_requirement ;
if [ modules.peek : UNIX ]
{
regex_pthread_requirement = <toolset>gcc:<library>pthread/<link>shared ;
}
#requirements = [ extension.refine boost $(version) : <tag>@boost-tag ] ;
local common-requirements =
<include>$(location)
<define>BOOST_ALL_NO_LIB=1
;
alias boost
:
: $(common-requirements)
$(requirements)
:
: $(common-requirements)
;
lib filesystem
:
: $(requirements)
<location-prefix>filesystem-$(version-tokens:J=_)
<use>boost
<threading>multi
<link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
<link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1
<define>BOOST_FILESYSTEM_NO_LIB=1
#<define>BOOST_FILESYSTEM_NO_DEPRECATED
<conditional>@filesystem-requirements
<library>system
:
: <define>BOOST_FILESYSTEM_NO_LIB=1
<link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
<link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1
<link>shared:<define>BOOST_ALL_DYN_LINK=1
#<define>BOOST_FILESYSTEM_NO_DEPRECATED
<toolset>msvc:<define>BOOST_USE_WINAPI_VERSION=0x0501
<library>system
;
lib program_options
: [ path.glob $(location)/libs/program_options/src : *.cpp ]
: $(requirements)
<location-prefix>program_options-$(version-tokens:J=_)
<use>boost
<threading>multi
<link>shared:<define>BOOST_PROGRAM_OPTIONS_DYN_LINK=1
<define>BOOST_PROGRAM_OPTIONS_NO_LIB=1
:
: <define>BOOST_PROGRAM_OPTIONS_NO_LIB=1
<link>shared:<define>BOOST_PROGRAM_OPTIONS_DYN_LINK=1
;
lib shell32 : : <name>shell32 ; # for CommandLineToArgW
lib nowide
: [ path.glob $(location)/libs/nowide/src : *.cpp ]
: $(requirements)
<location-prefix>nowide-$(version-tokens:J=_)
<use>boost
<threading>multi
<link>shared:<define>BOOST_NOWIDE_DYN_LINK=1
<define>BOOST_NOWIDE_NO_LIB=1
<toolset>msvc:<library>shell32
<include>$(location)/../boost_aux
:
: <define>BOOST_NOWIDE_NO_LIB=1
<link>shared:<define>BOOST_NOWIDE_DYN_LINK=1
<toolset>msvc:<library>shell32
;
lib iostreams
: [ path.glob $(location)/libs/iostreams/src : *.cpp : zlib.cpp gzip.cpp bzip2.cpp lzma.cpp zstd.cpp ]
: $(requirements)
<location-prefix>iostreams-$(version-tokens:J=_)
<use>boost
<threading>multi
<link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
<boost-iostreams-zlib>on:<source>$(location)/libs/iostreams/src/zlib.cpp
<boost-iostreams-zlib>on:<source>$(location)/libs/iostreams/src/gzip.cpp
<boost-iostreams-zlib>on:<library>/ext/zlib//z
#<toolset>msvc,<boost-iostreams-zlib>on:<link>static
<boost-iostreams-bzip2>on:<source>$(location)/libs/iostreams/src/bzip2.cpp
#<toolset>msvc,<boost-iostreams-bzip2>on:<link>static
<define>BOOST_IOSTREAMS_NO_LIB=1
:
: <define>BOOST_IOSTREAMS_NO_LIB=1
<link>shared:<define>BOOST_IOSTREAMS_DYN_LINK=1
<boost-iostreams-zlib>on:<library>/ext/zlib//z
;
local tmp = [ modules.peek : BOOST_BUILD_PATH ] ;
tmp += $(location)/libs/serialization/build ;
modules.poke : BOOST_BUILD_PATH : $(tmp) ;
local serialization_sources =
archive_exception
basic_archive
basic_iarchive
basic_iserializer
basic_oarchive
basic_oserializer
basic_pointer_iserializer
basic_pointer_oserializer
basic_serializer_map
basic_text_iprimitive
basic_text_oprimitive
basic_xml_archive
binary_iarchive
binary_oarchive
extended_type_info
extended_type_info_typeid
extended_type_info_no_rtti
polymorphic_iarchive
polymorphic_oarchive
stl_port
text_iarchive
text_oarchive
polymorphic_text_iarchive
polymorphic_text_oarchive
polymorphic_binary_iarchive
polymorphic_binary_oarchive
polymorphic_xml_iarchive
polymorphic_xml_oarchive
void_cast
xml_grammar
xml_iarchive
xml_archive_exception
codecvt_null
xml_oarchive
utf8_codecvt_facet
;
local wserialization_sources =
basic_text_wiprimitive
basic_text_woprimitive
text_wiarchive
text_woarchive
polymorphic_text_wiarchive
polymorphic_text_woarchive
xml_wgrammar
xml_wiarchive
xml_woarchive
polymorphic_xml_wiarchive
polymorphic_xml_woarchive
;
lib serialization
: $(location)/libs/serialization/src/$(serialization_sources).cpp
: $(requirements)
<location-prefix>serialization-$(version-tokens:J=_)
<use>boost
#<threading>multi
<toolset>msvc:<cxxflags>/Gy
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
<toolset>clang:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
<toolset>gcc:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
<toolset>darwin:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
<toolset>gcc:<cxxflags>"-ftemplate-depth-255"
<toolset>clang:<cxxflags>"-ftemplate-depth-255"
<toolset>darwin:<cxxflags>"-ftemplate-depth-255"
<link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
<define>BOOST_SERIALIZATION_NO_LIB=1
:
: <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
<define>BOOST_SERIALIZATION_NO_LIB=1
;
lib wserialization
: $(location)/libs/serialization/src/$(wserialization_sources).cpp serialization
: $(requirements)
<location-prefix>wserialization-$(version-tokens:J=_)
<use>boost
#<threading>multi
<toolset>msvc:<cxxflags>/Gy
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
<toolset>clang:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
<toolset>gcc:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
<toolset>darwin:<cxxflags>"-fvisibility=hidden -fvisibility-inlines-hidden"
<toolset>gcc:<cxxflags>"-ftemplate-depth-255"
<toolset>clang:<cxxflags>"-ftemplate-depth-255"
<toolset>darwin:<cxxflags>"-ftemplate-depth-255"
<link>shared:<define>BOOST_WSERIALIZATION_DYN_LINK=1
<define>BOOST_SERIALIZATION_NO_LIB=1
:
: <link>shared:<define>BOOST_WSERIALIZATION_DYN_LINK=1
<define>BOOST_SERIALIZATION_NO_LIB=1
;
local thread_sources ;
if [ modules.peek : NT ]
{
thread_sources =
win32/thread
win32/tss_dll
future
;
} else
{
thread_sources =
pthread/thread
pthread/once
future
;
}
local alternate_thread_sources ;
if [ modules.peek : NT ]
{
if $(version-tokens[2]) < 44
{
alternate_thread_sources += <source>$(THIS_PATH)/boost_aux/libs/thread/src/win32/tss_pe-before_1_44.cpp ;
}
}
lib thread
: $(location)/libs/thread/src/$(thread_sources).cpp
: $(requirements)
<location-prefix>thread-$(version-tokens:J=_)
<use>boost
<toolset>gcc:<cxxflags>-Wextra
<toolset>gcc:<cxxflags>-pedantic
<toolset>gcc:<cxxflags>-Wno-long-long
#<toolset>gcc:<cxxflags>-ansi
#<toolset>gcc:<cxxflags>-fpermissive
<toolset>gcc:<cxxflags>-Wno-variadic-macros
#<toolset>gcc:<cxxflags>-Wunused-local-typedefs
<toolset>gcc:<cxxflags>-Wunused-function
<toolset>darwin:<cxxflags>-Wextra
<toolset>darwin:<cxxflags>-pedantic
#<toolset>darwin:<cxxflags>-ansi
<toolset>darwin:<cxxflags>-fpermissive
<toolset>darwin:<cxxflags>-Wno-long-long
<toolset>darwin:<cxxflags>-Wno-variadic-macros
#<toolset>darwin:<cxxflags>-Wunused-local-typedefs
<toolset>darwin:<cxxflags>-Wunused-function
#<toolset>pathscale:<cxxflags>-Wextra
<toolset>pathscale:<cxxflags>-Wno-long-long
<toolset>pathscale:<cxxflags>-pedantic
<toolset>clang:<cxxflags>-Wextra
<toolset>clang:<cxxflags>-pedantic
#<toolset>clang:<cxxflags>-ansi
#<toolset>clang:<cxxflags>-fpermissive
<toolset>clang:<cxxflags>-Wno-long-long
<toolset>clang:<cxxflags>-Wunused-function
<toolset>clang:<cxxflags>-Wno-variadic-macros
<toolset>gcc-mingw-4.4.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.6.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.6.3:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.7.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.8.0:<cxxflags>-fdiagnostics-show-option
#<toolset>gcc:<cxxflags>-Wno-missing-field-initializers
<toolset>darwin-4.6.2:<cxxflags>-Wno-delete-non-virtual-dtor
<toolset>darwin-4.7.0:<cxxflags>-Wno-delete-non-virtual-dtor
#<toolset>clang-2.8:<cxxflags>-Wno-delete-non-virtual-dtor
#<toolset>clang-2.8:<cxxflags>-Wno-unused-function
#<toolset>clang-2.9:<cxxflags>-Wno-delete-non-virtual-dtor
#<toolset>clang-2.9:<cxxflags>-Wno-unused-function
<toolset>clang-3.0:<cxxflags>-Wno-delete-non-virtual-dtor
#<toolset>clang-3.0:<cxxflags>-Wno-unused-function
#<toolset>clang-3.0:<cxxflags>-Wno-unused-variable
<link>shared:<define>BOOST_THREAD_DYN_LINK=1
<link>shared:<define>BOOST_THREAD_BUILD_DLL=1
<link>static:<define>BOOST_THREAD_BUILD_LIB=1
<define>BOOST_THREAD_NO_LIB=1
<define>BOOST_THREAD_USES_CHRONO
$(alternate_thread_sources)
<link>static:<source>$(THIS_PATH)/tss_workaround.cpp
<library>date_time
<library>chrono
:
: <link>shared:<define>BOOST_THREAD_DYN_DLL=1
<link>static:<define>BOOST_THREAD_USE_LIB=1
<define>BOOST_THREAD_NO_LIB=1
<library>date_time
<library>chrono
;
if $(version-tokens[2]) < 73
{
local date_time_sources =
greg_month
;
lib date_time
: $(location)/libs/date_time/src/gregorian/$(date_time_sources).cpp
: $(requirements)
<location-prefix>date_time-$(version-tokens:J=_)
<use>boost
<link>shared:<define>BOOST_DATE_TIME_DYN_LINK=1
<link>static:<define>BOOST_DATE_TIME_STATIC_LINK
#<define>NO_BOOST_DATE_TIME_INLINE
<define>BOOST_DATE_TIME_NO_LIB=1
:
: <link>shared:<define>BOOST_DATE_TIME_DYN_LINK=1
#<define>NO_BOOST_DATE_TIME_INLINE
<define>BOOST_DATE_TIME_NO_LIB=1
;
}
else
{
alias date_time ;
}
if $(version-tokens[2]) < 47
{
alias chrono ;
}
else
{
boost_chrono_sources = chrono thread_clock process_cpu_clocks ;
lib chrono
: $(location)/libs/chrono/src/$(boost_chrono_sources).cpp
: $(requirements)
<location-prefix>chrono-$(version-tokens:J=_)
<use>boost
<target-os>freebsd:<linkflags>"-lrt"
<target-os>linux:<linkflags>"-lrt"
<toolset>pgi:<linkflags>"-lrt"
#<threading>single:<define>BOOST_CHRONO_THREAD_DISABLED
<library>system
#<define>BOOST_ERROR_CODE_HEADER_ONLY
#<define>BOOST_SYSTEM_INLINED
#<define>BOOST_COMMON_TYPE_USES_STATIC_ASSERT
#<define>BOOST_RATIO_USES_STATIC_ASSERT
#<define>BOOST_CHRONO_USES_STATIC_ASSERT
#<define>BOOST_COMMON_TYPE_USES_MPL_ASSERT
#<define>BOOST_RATIO_USES_MPL_ASSERT
#<define>BOOST_CHRONO_USES_MPL_ASSERT
#<define>BOOST_COMMON_TYPE_USES_ARRAY_ASSERT
#<define>BOOST_RATIO_USES_ARRAY_ASSERT
#<define>BOOST_CHRONO_USES_ARRAY_ASSERT
<toolset>sun:<define>__typeof__=__typeof__
<define>BOOST_SYSTEM_NO_DEPRECATED
#<toolset>gcc-3.4.4:<linkflags>--enable-auto-import
#<toolset>gcc-4.3.4:<linkflags>--enable-auto-import
#<toolset>gcc-mingw-4.4.0:<linkflags>--enable-auto-import
#<toolset>gcc-mingw-4.5.0:<linkflags>--enable-auto-import
<toolset>gcc:<cxxflags>-Wextra
<toolset>gcc:<cxxflags>-pedantic
<toolset>gcc:<cxxflags>-Wno-long-long
<toolset>darwin:<cxxflags>-Wextra
<toolset>darwin:<cxxflags>-pedantic
<toolset>darwin:<cxxflags>-Wno-long-long
#<toolset>pathscale:<cxxflags>-Wextra
<toolset>pathscale:<cxxflags>-Wno-long-long
<toolset>pathscale:<cxxflags>-pedantic
<toolset>clang:<cxxflags>-Wextra
<toolset>clang:<cxxflags>-pedantic
<toolset>clang:<cxxflags>-Wno-long-long
<toolset>gcc-mingw-4.4.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.6.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.6.3:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.7.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.8.0:<cxxflags>-fdiagnostics-show-option
# Note: Some of the remarks from the Intel compiler are disabled
# remark #304: access control not specified ("public" by default)
# remark #383: value copied to temporary, reference to temporary used
# remark #1418: external function definition with no prior declaration
<toolset>intel:<cxxflags>-wd304,383,1418
<link>shared:<define>BOOST_ALL_DYN_LINK=1 # tell source we're building dll's
<link>static:<define>BOOST_ALL_STATIC_LINK=1 # tell source we're building static lib's
:
: <threading>single:<define>BOOST_CHRONO_THREAD_DISABLED
<library>system
#<define>BOOST_ERROR_CODE_HEADER_ONLY
#<define>BOOST_SYSTEM_INLINED
#<define>BOOST_COMMON_TYPE_USES_STATIC_ASSERT
#<define>BOOST_RATIO_USES_STATIC_ASSERT
#<define>BOOST_CHRONO_USES_STATIC_ASSERT
#<define>BOOST_COMMON_TYPE_USES_MPL_ASSERT
#<define>BOOST_RATIO_USES_MPL_ASSERT
#<define>BOOST_CHRONO_USES_MPL_ASSERT
#<define>BOOST_COMMON_TYPE_USES_ARRAY_ASSERT
#<define>BOOST_RATIO_USES_ARRAY_ASSERT
#<define>BOOST_CHRONO_USES_ARRAY_ASSERT
#<toolset>vacpp:<define>BOOST_COMMON_TYPE_DONT_USE_TYPEOF
<toolset>vacpp:<define>BOOST_TYPEOF_EMULATION
<toolset>sun:<define>__typeof__=__typeof__
<define>BOOST_SYSTEM_NO_DEPRECATED
<link>shared:<define>BOOST_CHRONO_DYN_LINK=1
<link>static:<define>BOOST_CHRONO_STATIC_LINK=1
<toolset>gcc-3.4.4:<linkflags>--enable-auto-import
<toolset>gcc-4.3.4:<linkflags>--enable-auto-import
<toolset>gcc-mingw-4.4.0:<linkflags>--enable-auto-import
<toolset>gcc-mingw-4.5.0:<linkflags>--enable-auto-import
;
}
lib regex
: [ path.glob $(location)/libs/regex/src : *.cpp ]
: $(requirements)
$(regex_pthread_requirement)
<location-prefix>regex-$(version-tokens:J=_)
<use>boost
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
<define>BOOST_REGEX_NO_LIB=1
<define>BOOST_REGEX_MATCH_EXTRA
<toolset>msvc:<cxxflags>/wd4309
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
:
: <define>BOOST_REGEX_NO_LIB=1
<define>BOOST_REGEX_MATCH_EXTRA
<link>shared:<define>BOOST_REGEX_DYN_LINK=1
;
lib system
: $(location)/libs/system/src/error_code.cpp
: $(requirements)
<location-prefix>system-$(version-tokens:J=_)
<use>boost
<define>BOOST_SYSTEM_NO_LIB=1
<link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
<link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
:
: <define>BOOST_SYSTEM_NO_LIB=1
<link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
<link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
;
lib atomic
: $(location)/libs/atomic/src/lock_pool.cpp
: $(requirements)
<location-prefix>atomic-$(version-tokens:J=_)
<use>boost
<define>BOOST_ATOMIC_SOURCE
<link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
<link>static:<define>BOOST_ATOMIC_STATIC_LINK=1
<include>$(location)/libs/atomic/src
:
:
<link>shared:<define>BOOST_ATOMIC_DYN_LINK=1
<link>static:<define>BOOST_ATOMIC_STATIC_LINK=1
;
lib psapi ;
lib ws2_32 ;
lib log
: [ path.glob $(location)/libs/log/src : *.cpp : event_log_backend.cpp debug_output_backend.cpp light_rw_mutex.cpp dump_ssse3.cpp dump_avx2.cpp ]
: $(requirements)
<location-prefix>log-$(version-tokens:J=_)
<use>boost
<conditional>@log-platform-specific-sources
<toolset>msvc:<cxxflags>/bigobj
<toolset>darwin:<cxxflags>-ftemplate-depth-1024
<toolset>clang:<cxxflags>-ftemplate-depth-1024
<toolset>gcc:<cxxflags>-ftemplate-depth-1024
<toolset>gcc:<cxxflags>-fno-strict-aliasing # avoids strict aliasing violations in other Boost components
<toolset>gcc-mingw:<linkflags>-Wl,--enable-auto-import
<toolset>gcc-cygwin:<linkflags>-Wl,--enable-auto-import
<library>date_time
<library>filesystem
<library>system
<library>regex
<threading>single:<define>BOOST_LOG_NO_THREADS
<threading>multi:<library>thread
<target-os>windows:<library>ws2_32
<target-os>freebsd:<linkflags>"-lrt"
<target-os>linux:<linkflags>"-lrt -lpthread"
<toolset>pgi:<linkflags>"-lrt"
<define>BOOST_LOG_WITHOUT_EVENT_LOG
: # default-build
: # usage-requirements
<toolset>clang:<cxxflags>-Wno-bind-to-temporary-copy
<toolset>clang:<cxxflags>-Wno-unused-function
<library>date_time
<library>filesystem
<library>system
<library>regex
<threading>multi:<library>thread
<define>BOOST_LOG_WITHOUT_EVENT_LOG
<toolset>msvc:<define>BOOST_USE_WINAPI_VERSION=0x0501
;
local PRG_EXEC_MON_SOURCES =
execution_monitor
debug
cpp_main
;
local TEST_EXEC_MON_SOURCES =
compiler_log_formatter
debug
execution_monitor
framework
plain_report_formatter
progress_monitor
results_collector
results_reporter
test_main
test_tools
unit_test_log
unit_test_main
unit_test_monitor
unit_test_parameters
unit_test_suite
xml_log_formatter
xml_report_formatter
;
local UTF_SOURCES =
compiler_log_formatter
debug
exception_safety
execution_monitor
framework
interaction_based
logged_expectations
plain_report_formatter
progress_monitor
results_collector
results_reporter
test_tools
unit_test_log
unit_test_main
unit_test_monitor
unit_test_parameters
unit_test_suite
xml_log_formatter
xml_report_formatter
;
lib prg_exec_monitor
: # sources
$(location)/libs/test/src/$(PRG_EXEC_MON_SOURCES).cpp
: # requirements
$(requirements)
<location-prefix>prg_exec_monitor-$(version-tokens:J=_)
<use>boost
;
lib test_exec_monitor
: # sources
$(location)/libs/test/src/$(TEST_EXEC_MON_SOURCES).cpp
: # requirements
$(requirements)
<location-prefix>test_exec_monitor-$(version-tokens:J=_)
<use>boost
<link>static
;
lib unit_test_framework
: # sources
$(location)/libs/test/src/$(UTF_SOURCES).cpp
: # requirements
$(requirements)
<location-prefix>unit_test_framework-$(version-tokens:J=_)
<use>boost
;
if <boost-interprocess> in $(requirements:G)
{
local i = [ property.select <boost-interprocess> : $(requirements) ] ;
if ! ( $(i:G=) in enable disable )
{
local i-location = [ path.make $(i:G=) ] ;
local i-files = [ path.glob-tree $(i-location)/boost/interprocess : *.hpp ] ;
local custom-files ;
for local i-file in $(i-files)
{
local custom-file = [ path.relative $(i-file) $(i-location) ] ;
make $(custom-file) : $(i-file) : common.copy
: $(requirements)
<location-prefix>interprocess-$(version-tokens:J=_)
;
custom-files += $(custom-file) ;
}
alias interprocess
:
: $(requirements)
<use>boost
<dependency>$(custom-files)
:
: $(common-requirements)
<dependency>$(custom-files)
<implicit-dependency>$(custom-files)
;
}
else if $(i:G=) = enable
{
alias interprocess
:
: $(requirements)
<use>boost
:
:
;
}
}
if <boost-asio> in $(requirements:G)
{
local i = [ property.select <boost-asio> : $(requirements) ] ;
if ! ( $(i:G=) in enable disable )
{
local i-location = [ path.make $(i:G=) ] ;
local i-files = [ path.glob-tree $(i-location)/boost/asio : *.hpp ] ;
local custom-files ;
for local i-file in $(i-files)
{
local custom-file = [ path.relative $(i-file) $(i-location) ] ;
make $(custom-file) : $(i-file) : common.copy
: $(requirements)
<location-prefix>asio-$(version-tokens:J=_)
;
custom-files += $(custom-file) ;
}
alias asio
:
: $(requirements)
<use>boost
<dependency>$(custom-files)
:
: $(common-requirements)
<dependency>$(custom-files)
<implicit-dependency>$(custom-files)
;
}
else if $(i:G=) = enable
{
alias asio
:
: $(requirements)
<use>boost
:
:
;
}
}
}
}