blob: 8be59e5a9159a5cbbed96144e4ce1b76ec8e5342 (
plain)
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
|
#cdec compilation with bjam
#
#--with-boost=/usr/include
#--with-google-hash=/usr/include so that $with-google-hash/google/dense_hash_map exists
#
#-a forces the build to run from scratch
#-jN parallelizes just like make
#
#Respects CXXFLAGS, CFLAGS, and LDFLAGS environment variables.
path-constant TOP : . ;
include $(TOP)/jam-files/sanity.jam ;
boost 104400 ;
external-lib z ;
with-google-hash = [ option.get "with-google-hash" ] ;
if [ test_header google/dense_hash_map ] || $(with-google-hash) {
requirements += <define>HAVE_SPARSEHASH <include>$(with-google-hash) ;
}
if [ test_header cmph.h ] || $(with-cmph) {
requirements += <define>HAVE_CMPH <include>$(with-cmph) ;
}
if [ test_header boost/serialization/map.hpp ] && [ test_library boost_serialization ] {
requirements += <define>HAVE_BOOST_ARCHIVE_TEXT_OARCHIVE_HPP ;
}
# project : requirements $(requirements) ;
project : requirements $(requirements) <toolset>darwin:<link>static ;
project : default-build <threading>single <warnings>on <variant>release ;
install-bin-libs utils//programs mteval//programs klm/lm//programs training//liblbfgs decoder//cdec creg//creg phrasinator//programs mira//kbest_mira ;
build-projects mteval decoder klm/lm training/liblbfgs creg ;
#Compile everything ending with _test.cc into a test and run it.
rule all_tests ( targets * : dependencies : properties * ) {
targets ?= [ glob *_test.cc ] ;
for t in $(targets) {
local base = [ MATCH "^(.*).cc$" : $(t) ] ;
unit-test $(base) : $(t) $(dependencies) ..//boost_unit_test_framework : $(properties) ;
}
}
|