Boost logo

Boost-Build :

Subject: [Boost-build] Unable to run sandbox tests in own directory
From: Edward Diener (eldiener_at_[hidden])
Date: 2010-11-29 18:17:51


Using the jamfiles in the 'example' sandbox directory structure I
attempted to setup my variadic_macro_data library so that executing bjam
with the command-line option of --boost=/path/to/boost/distribution
would allow me to test my source files without having to move the
variadic_macro_data library under a Boost distribution ( such as the
Boost trunk under SVN ).

But this failed as a header file in the Boost distribution could not be
found, even though clearly it is there ( #include <boost/config.hpp> ).

The top level project-root.jam is exactly the same as the one for
'example'. The top-level jamfile.v2 is exactly the same as the one for
'example' except I put my own library's name as the project name:

-------------------------------------

project variadic_macro_data
     : requirements
         <include>.
         <include>$(boost-root)
     :
         build-dir bin.v2
     ;

-------------------------------------

My test jamfile is:

--------------------------------------------------------------------

import testing ;
project variadic_macro_data_tests : requirements <warnings>on
 
<toolset>gcc-4.4.0:<warnings>all
 
<toolset>gcc-4.4.0:<cxxflags>-Wno-variadic-macros
 
<toolset>gcc-4.5.0:<warnings>all
 
<toolset>gcc-4.5.0:<cxxflags>-Wno-variadic-macros
 
<toolset>gcc-4.5.0:<linkflags>"-Wl,--enable-auto-import"
 
<toolset>msvc:<warnings>all
                                                  ;
test-suite variadic_macro_data_test_suite
     :
         [ run TestData.cpp ]
         [ run TestDataAsTuple.cpp ]
         [ run TestDataAsArray.cpp ]
         [ run TestDataAsList.cpp ]
         [ run TestDataAsSequence.cpp ]
     ;

----------------------------------------------------------------------

When I go to the directory with my test jamfile and execute:

bjam --boost=C:/Programming/VersionControl/boost toolset=msvc-10.0

I get errors in the compile that shows that my own header files in the
sandbox/variadic_macro_data/boost/variadic_macro_data are being found
but the header files under C:/Programming/VersionControl/boost
directory, where my SVN trunk of the latest Boost resides, are not.

So somehow this whole technique, as ilustrated with the 'example'
sandbox library does not work. But I have no idea why.

is there any way to find out why this is failing ?
Does bjam have to be rebuilt somehow, and if so, how do I do so under
Windows ?

If I go to the 'example' test directory and try the above 'bjam' line
things get even worse, with the output:

---------------------------------------------------------------------

C:\Programming\VersionControl\sandbox\example\libs\example\test>bjam
--boost=C:/
Programming/VersionControl/boost toolset=msvc-10.0
Jamfile.v2:17: in modules.load
rule compile-fail unknown in module
Jamfile</C:/Programming/VersionControl/sandb
ox/example/libs/example/test>.
C:/Programming/VersionControl/boost/tools/build/v2/build\project.jam:314: in
loa
d-jamfile
C:/Programming/VersionControl/boost/tools/build/v2/build\project.jam:62:
in load

C:/Programming/VersionControl/boost/tools/build/v2/build\project.jam:168: in
pro
ject.find
C:/Programming/VersionControl/boost/tools/build/v2\build-system.jam:569:
in load

C:\Programming\VersionControl\boost\tools\build\v2/kernel\modules.jam:283:
in im
port
C:\Programming\VersionControl\boost\tools\build\v2\kernel\bootstrap.jam:142:
in
boost-build
C:\Programming\VersionControl\sandbox\boost-build.jam:66: in module scope

C:\Programming\VersionControl\sandbox\example\libs\example\test>

--------------------------------------------------------------------

Any help would be welcome.


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