Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to stop propagate include paths of internal library
From: Phillip Seaver (phil_at_[hidden])
Date: 2009-03-09 08:53:01


Franz wrote:
> 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

I describe how I do it here:
http://lists.boost.org/boost-build/2008/12/20976.php

I prefer it that way to avoid header conflicts between third-party
libraries and reduce my search path. I don't recall whether I ran into
the command-line limitation, but I wouldn't now, since the msvc toolset
uses "response files" to reduce the command-line size.

Phillip


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