[cmake-developers] [PATCH] FindProtobuf: check version

Antonio Pérez Barrero apbarrero at gmail.com
Tue Feb 9 03:51:34 EST 2016


>
> > +  math(EXPR Protobuf_MAJOR_VERSION "${Protobuf_VERSION} / 1000000")
> > +  math(EXPR Protobuf_MINOR_VERSION "${Protobuf_VERSION} / 1000 % 1000")
> > +  math(EXPR Protobuf_SUBMINOR_VERSION "${Protobuf_VERSION} % 1000")
>
> Would string manipulation be better here?


I don't know how to make it better. I took FindBoost.cmake code as template
here. Which could be a better way?

Thanks,
Antonio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160209/9e66e0da/attachment.html>


More information about the cmake-developers mailing list