Making FindBoost prefer Boost_ROOT
mw_triad at users.sourceforge.net
Thu Mar 27 17:01:31 GMT 2008
Andreas Pakulat wrote:
> On 26.03.08 18:32:26, Matthew Woehlke wrote:
>> Alexander Neundorf wrote:
>>> On Thursday 27 March 2008, Matthew Woehlke wrote:
>>>> Alexander Neundorf wrote:
>>>> 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,
> No we don't.
Ok, so maybe I just have them to deal with all the setting of PATH,
LD_LIBRARY_PATH, etc I have to do, then :-). But I still prefer writing
my environment-setup scripts that way; plus it's nice to be able to do
things like 'ls $QTDIR/include'.
>> 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).
> I've recently got a private mail with some fixes for the FindBoost.cmake
> thats (hopefully) getting into a CMake 2.6.x release. I just need to get
> around at backporting some of them to the kdevplatform one (because the
> 2.6 version uses 2.6 features)
Ok. Btw I found I had remove the 'if(NOT Boost_INCLUDE_DIR)' in the
foreach also, since the system one is found immediately, but the
BOOST_ROOT one, being the last version that is checked, isn't found for
several iterations. Other than being slower (not noticeably so, and only
at configure time), I don't think it's a problem.
That said, the version list should probably search latest-first.
Incidentally, I also did this:
- SET(Boost_INCLUDE_DIR FALSE)
+ SET(Boost_INCLUDE_DIR Boost_INCLUDE_DIR-NOTFOUND)
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