|
Boost-Build : |
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-07-09 14:18:30
While trying to setup a project outside of boost tree I found a problem
with BOOST_ROOT calculation. Perhaps the path-global is not intended to
work with relative paths?
But then a comment in the Jamrules in the example directory of python
let me believe it should work.
Steps to reproduce the problem:
This is my boost tree:
/home/roland/Projects/boost/HEAD
This is my project tree:
/home/roland/Projects/thread_test
The Jamrules file in my project tree:
path-global BOOST_ROOT : ../boost/HEAD ;
project boost : $(BOOST_ROOT) ;
The Jamfile in my project tree:
project-root ;
exe hello
: hello.cpp
<lib>@boost/libs/thread/build/boost_thread
:
: <threading>multi
;
When invoking bjam from my project tree I can see that a wrong
boost-root is in the -I search path for includes:
"g++" -c -DBOOST_THREAD_LIB_NAME=boost_thread
-DBOOST_THREAD_BUILD_LIB=1 -g -O0 -fno-inline -pthread -Wall
-ftemplate-depth-255 -I"bin/boost/libs/thread/build" -I
"/home/roland/Projects/boost/boost/HEAD" -o
"bin/boost/libs/thread/build/libboost_thread.a/gcc/debug/threading-multi/barrier.o"
"/home/roland/Projects/boost/HEAD/libs/thread/build/../src/barrier.cpp"
The -I "/home/roland/Projects/boost/boost/HEAD" obviously is wrong.
When I set my Jamrules to absolute paths as:
path-global BOOST_ROOT : /home/roland/Projects/boost/HEAD ;
project boost : $(BOOST_ROOT) ;
The include path is calculated correctly:
"g++" -c -DBOOST_THREAD_LIB_NAME=boost_thread
-DBOOST_THREAD_BUILD_LIB=1 -g -O0 -fno-inline -pthread -Wall
-ftemplate-depth-255 -I"bin/boost/libs/thread/build" -I
"/home/roland/Projects/boost/HEAD" -o
"bin/boost/libs/thread/build/libboost_thread.a/gcc/debug/threading-multi/barrier.o"
"/home/roland/Projects/boost/HEAD/libs/thread/build/../src/barrier.cpp"
Am I missing something, or is this a bug?
Regards,
Roland
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk