Boost logo

Boost-Build :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2007-10-23 09:18:00


"Michael Caisse" <boost_at_[hidden]> wrote in message
news:471D95DF.1040602_at_objectmodelingdesigns.com...
> Gennadiy Rozental wrote:
>>
>>> Gennady -
>>>
>>> install common_location
>>> : output_test_stream_test
>>> : <install-dependencies>on
>>> <install-type>LIB
>>> <location>$(BOOST_ROOT)/stage
>>> ;
>>>
>>>
>>> will install output_test_stream_test and all of the dependencies in the
>>> $(BOOST_ROOT)/stage directory.
>>>
>>
>> Nope. I added above to the test/Jamfile and run bjam toolset=borland
>> output_test_stream_test. Library is built, but never copied into desired
>> location.
>>
>> I also need this to work generically for all unit test modules.
>>
>> Gennadiy
>>
>>
> Of course not. You told it to build the target output_test_stream_test
> so it is going to do that. It isn't going to build the common_location
> target because you said to just build the output_test_stream_test.
>
> It is not that different from other build systems. It did exactly what
> you specified.

I use many different make system. I even wrote 1 personally. My ususal
expectation is that dependant library are automatically copied into dsired
location. This is especially true if you tell the compiler not to use
LD_LIBRARY_PATh and hardcode specific search path into executable.

> Just type bjam toolset=borland
>
> if you don't like that, then specify both the targets you want with:
>
> bjam toolset=borland output_test_stream_test common_location

This is not what I need. Here is the rule I am using to execute the tests:

rule test-btl-lib ( test-rule : test-name : lib-name ? : pattern_file * :
source_files * )
{
   source_files ?= $(test-name).cpp ;

   return [ $(test-rule) $(source_files) ../build//$(lib-name)
            : #args
            : $(pattern_file)
            : #<stlport-iostream>on
              <toolset>borland:<cxxflags>-w-8080
              <toolset>msvc-6.5:<link>static
              <define>BOOST_TEST_NO_AUTO_LINK=1 # requirements
            : $(test-name)
          ] ;
}

Here how I use it:

          [ test-btl-lib run : fixed_mapping_test :
boost_unit_test_framework ]
          [ test-btl-lib run : algorithms_test :
boost_unit_test_framework/<link>static ]

What should I put inside it so all updated dependant shared libraries (I
don't need .libs ) are automatically gets copied?

Gennadiy


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