-
Notifications
You must be signed in to change notification settings - Fork 12
/
Jamroot.jam
52 lines (34 loc) · 1.28 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
# project : default-build <optimization>off debug ;
project : default-build <optimization>speed release ;
INSTALL_LOC = <location>stage/ ;
### Boost directory
import os ;
local BOOST_ROOT = [ os.environ BOOST_ROOT ] ;
if $(BOOST_ROOT) {
# echo "BOOST_ROOT = '" $(BOOST_ROOT) "'" ;
BOOST_INCLUDE_DIR = $(BOOST_ROOT) ;
} else {
echo "BOOST_ROOT variable not set!" ;
BOOST_INCLUDE_DIR = "/usr/include" ;
}
# Try to find boost/version.hpp
if [ GLOB $(BOOST_INCLUDE_DIR)/boost/ : version.hpp ] {
echo "Using BOOST_INCLUDE_DIR = '" $(BOOST_INCLUDE_DIR) "'" ;
} else {
echo "Could not find boost, skipping boost tests" ;
BOOST_INCLUDE_DIR = ;
}
### Boost alias
alias boost_headers : : : : <include>$(BOOST_INCLUDE_DIR) ;
### Setup strict_variant target
alias strict_variant_lib : : : : <include>../include/ ;
### Setup experimental::variant target
alias exp_variant_lib : : : : <include>../bench/mpark_variant/include/ ;
### Example header
alias example : : : : <include>. ;
### Targets
alias config : : : : <cxxflags>"-O3 -Wall -Werror -Wextra -pedantic -std=c++14 " ;
exe sv : strict_variant.cpp strict_variant_lib config ;
exe ev : exp_variant.cpp exp_variant_lib config ;
exe bv : boost_variant.cpp boost_headers config ;
install install-bin : sv bv ev : $(INSTALL_LOC) ;