Boost logo

Boost-Build :

Subject: [Boost-build] How to stop propagate include paths of internal library
From: Franz (fschnyder_at_[hidden])
Date: 2009-03-09 04:49:53


Hello

I have the problem than my build command line gets to big for windows xp due to
too much include paths. The problem is that all include paths are propagated up
through all the libraries even if the library is only use internal (just in
source files). Here a simplified example:

I Have an executable Exe which depends on library LibB which depends on library
LibA but only in the source files so Exe would not need the exported include
paths of LibA to compile.

I could not figure out how I can prevent that the includes of LibA are
propagated to Exe. Can somebody help me?

Here are the Jamfiles:

##-- Jamfile LibA
project LibA :
   : requirements
      <include>./inc
   : usage-requirements
      <include>./inc
;

lib LibA : [ glob src/*.cpp ] ;
##-- End Jamfile LibA

##-- Jamfile LibB
project LibB
   : requirements
      <include>./inc
      <library>/LibA
   : usage-requirements
      <include>./inc
;
##-- End Jamfile LibB

lib LibB : [ glob src/*.cpp ] ;

##-- Jamfile Exe
project Exe
   : requirements
      <library>/LibB
;

exe Exe : src/Main.cpp ;

##-- Jamfile Exe

And the command line for the Main.cpp is now :

"g++.exe" -I"..\LibA\inc" -I"..\LibB\inc" -c -o "bin\gcc\debug\Main.obj"
"Exe\src\Main.cpp"

but I would like it do be :

"g++.exe" -I"..\LibB\inc" -c -o "bin\gcc\debug\Main.obj" "Exe\src\Main.cpp"

Thanks for any advice.

regards

- Franz


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