← Back to team overview

kicad-developers team mailing list archive

Re: Kicad build fails with Boost 1.34 (documentation

 

Philip Pemberton wrote:
<< snipped >>
> 
> I can see two possible solutions for this:
> 1. Fix the code so that it doesn't use BOOST_REVERSE_FOREACH

I wrote this code and I don't have an issue with someone changing it as
long as they are willing to take over the maintenance of it. I like the
boost foreach macros. They really make for clean looking code. Yes,
you could use a reverse iterator in a for loop but the syntax isn't as
clean.

> 2. Document the fact that Kicad (or at least Cvpcb) won't build when 
> the version of Boost is less than 1.36, and maybe add something to make 
> Cmake check the Boost version when generating the Makefiles, and fail 
> if Boost is too old.

I prefer this solution. This is one of the items on my TODO list since
I was the one to use boost foreach macros. As many times as this issue
has come up, it seems as though now is the time to address it. I will
see if I can find the time to come up with a robust solution some time
this week after I commit the component library editor changes in my
development branch. The downside to this is that there will need to be
a custom Find_Boost cmake macro or a least a macro to perform the boost
library version test. Unfortunately, library version checking is one of
the weaknesses of the Cmake find macros.

> Unless of course anyone has any other ideas?
> 
> It seems BOOST_REVERSE_FOREACH is only used in that one place, although 
> there are instances of BOOST_FOREACH being used in other parts of the 
> Kicad codebase. In the interests of keeping the code easy to understand, 
> I'd be very tempted just to update COMPILING.txt and 
> COMPILING-Debian.txt, and maybe add the version-check...

The Kicad code is very complex. Anything to make it easier to maintain
is a good thing.

Wayne

> 
> Thanks,






References