Making FindBoost prefer Boost_ROOT

Matthew Woehlke mw_triad at
Wed Mar 26 23:32:26 GMT 2008

Alexander Neundorf wrote:
> On Thursday 27 March 2008, Matthew Woehlke wrote:
>> Alexander Neundorf wrote:
>>> On Wednesday 26 March 2008, Matthew Woehlke wrote:
>>>> In order to get my Boost_ROOT honored rather than the system boost in
>>>> /usr/include (which is too old), I had to make the following changes to
>>>> FindBoost.cmake (this is from kdevplatform, but I've had to copy the
>>>> module to pimlibs and now kdesdk also, due to the module from cmake
>>>> 2.4.6 being similarly inadequate). Should I commit this?
>>> With cmake 2.6 you can set the env. variable CMAKE_PREFIX_PATH, e.g.
>>> to /my/boost/install/dir, and then cmake will search this first (and
>>> append include/, lib/ and bin/ accordingly).
>>> Would that help in your case ?
>> er... no, not really. CMake 2.6 isn't out yet, 
> Yes, but it will be in a few days.
>> nor is it (currently) required by trunk. 
> This will stay this way as long as possible.

...and out of laziness I will keep using cmake 2.4.6 until it isn't 
supported :-).

>> Besides I'd rather not pollute CMAKE_PREFIX_PATH with
>> random packages' stuff when I can use Boost_ROOT instead. (Shouldn't
>> that be upper-case?)
> I don't think introducing an environment variable for every package is a good 
> idea.

Why not? We have QTDIR, KDEDIR, etc. This is useful because I can do 
things like add $QTDIR/bin to PATH, and /also/ have FindXyz notice such 
variables to find packages.

However, I think you miss the point. Boost *already* has Boost_ROOT*. 
The problem is that its find does a lousy job of honoring it (because it 
doesn't check twice with NO_DEFAULT_PATH, a system-level flavor is 
preferred over one in $Boost_ROOT).

(* ...and so far no one has commented on why this is mixed-case; it 
smells like a search-and-replace mistake.)

I'm anti-ascii. Probably because I once worked with a guy who sent EVERY 
BLOODY DESIGN SCHEMA as an ascii art thing. A year into that job and I 
just about wanted to punch him in the head with an ascii fist. He 
totally ruined ascii porn for me even. -- Aaron Seigo

More information about the kde-core-devel mailing list