-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jamroot.jam
63 lines (52 loc) · 1.29 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
# (C) Copyright Benedek Thaler 2015-2016.
# 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)
# Search for a boost installation to use
# Use BOOST_ROOT if present
# To set this variable, invoke bjam like this:
#
# $ BOOST_ROOT=/path/to/custom/install bjam
#
# A more permanent solution is to add the following
# to your ~/user-config.jam along with your compilers:
#
# path-constant BOOST_ROOT : /path/to/custom/install ;
#
# using gcc ;
# using clang ;
#
local boost_root = $(BOOST_ROOT) ;
if ! $(boost_root)
{
boost_root = [ modules.peek : BOOST_ROOT ] ;
}
if ! $(boost_root)
{
# BOOST_ROOT not set, let's see if the project
# is in the boost tree (under libs/project/)
if [ glob ../../boost/version.hpp ]
{
boost_root = ../../ ;
}
}
if ! $(boost_root)
{
# Still no luck. Let's see if bjam gives us a path
local dirs = [ modules.peek : BOOST_BUILD_PATH ] ;
for local dir in $(dirs)
{
if [ glob $(dir)/boost/version.hpp ]
{
boost_root = $(dir) ;
}
}
}
if $(boost_root)
{
ECHO "Using boost install:" $(boost_root) ;
path-constant BOOST_ROOT : $(boost_root) ;
}
else
{
ECHO "No custom boost install specified, will try to use system install" ;
}