Boost logo

Boost-Build :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-07-24 04:52:52

Vladimir Prus wrote:
> You might want to look at:
Thank you, I knew that.

> If explanations there makes no sense, please post the complete Jamfile.v2, as
> attachment, and I'll take a look.

Altough this explanation does make sense to me, I still do not know how
I should solve for it. I post you my Jamfile.v2.
I would be very glad if you could suggest, what I could do better...

project boost/thread
     : source-location ../src
     : default-build <threading>multi

lib boost_thread_pthread
        : ## sources ##
        : ## requirements ##

lib boost_thread
        : ## sources ##
        : ## requirements ##
Obviously the build system treats pthread/thread.cpp and
linux/thread.cpp as beeing the same names, doesn't it?

This gives me the error:

warning: Python location is not configured
warning: the Boost.Python library won't be built
Building Boost.Regex with the optional Unicode/ICU support disabled.
Please refer to the Boost.Regex documentation for more information
(and if you don't know what ICU is then you probably don't need it).
in virtual-target.register-actual-name from module virtual-target
error: Duplicate name of actual target:
error: previous virtual target { gcc%gcc.compile.c++-thread.o.OBJ {
pthread/thread.cpp.CPP } }
error: created from ../../../libs/thread/build/boost_thread_pthread
error: another virtual target { gcc%gcc.compile.c++-thread.o.OBJ {
linux/thread.cpp.CPP } }
error: created from ../../../libs/thread/build/boost_thread
error: added properties: none
error: removed properties: none
in actualize-no-scanner from module object(file-target)@249
in object(file-target)@249.actualize from module object(file-target)@249
in actualize-source-type from module object(action)@258
in actualize-sources from module object(action)@258
in object(action)@258.actualize from module object(action)@258
in actualize-action from module object(file-target)@259
in actualize-no-scanner from module object(file-target)@259
in object(file-target)@259.actualize from module object(file-target)@259
in load from module build-system
in import from module modules
in boost-build from module
/home/roland/Projects/boost/thread_rewrite/boost-build.jam:12: in module
scope from module

Isn't it possible to have the names of the lib's causing the objects go
to a separate directory as bbv1 did?

I tried then to follow the suggestions of the posted link.
This indeed did work, but it causes my Jamfile look _very_ odd:

project boost/thread
     : source-location ../src
     : default-build <threading>multi

obj pthread_thread : pthread/thread.cpp ;
obj pthread_mutex : pthread/mutex.cpp ;
obj pthread_condition : pthread/condition.cpp ;
obj pthread_exceptions : pthread/exceptions.cpp ;
obj pthread_xtime : pthread/xtime.cpp ;

lib boost_thread_pthread
        : ## sources ##
        : ## requirements ##

obj linux_thread : linux/thread.cpp ;
obj linux_mutex : linux/mutex.cpp ;
obj linux_condition : linux/condition.cpp ;
obj linux_exceptions : linux/exceptions.cpp ;
obj linux_xtime : linux/xtime.cpp ;

lib boost_thread
        : ## sources ##
        : ## requirements ##

Also this setup will make it harder to to specify common build
properties. I think I would need a template for the obj's wouldn't I?

It would be nice if I could put something like <build-dir>pthread or
<build-dir>linux into the requirements of the lib. Or can I simply
invent a variant, say <variant>linux and put this into the requirements?


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at