[cmake-developers] [PATCH] New module FindXerces
Roger Leigh
rleigh at codelibre.net
Sun Aug 17 09:36:26 EDT 2014
On Sun, Aug 17, 2014 at 02:28:59PM +0100, Roger Leigh wrote:
> On Sun, Aug 17, 2014 at 02:57:36PM +0200, Rolf Eike Beer wrote:
> > Roger Leigh wrote:
> > > Dear Chuck,
> > >
> > > Thanks for looking at this. Please find attached a new copy of the
> > > patch which should address all your points. If you would like any
> > > further changes making, please just let me know.
> >
> > I don't think you need the functions for anything, especially not
> > _Xerces_FIND. From what I can tell they only serve the purpose of not leaking
> > variables. The only thin protected in _Xerces_FIND are the version components,
> > that could easily be fixed by just returning the concatenated version string
> > from the inner function. What I would find more useful is actually checking
> > that Xerces_INCLUDE_DIR is set before calling _Xerces_GET_VERSION(), otherwise
> > you would try to open "/xercesc/util/XercesVersion.hpp", which is definitely
> > wrong.
>
> You're right about the function, it was to prevent leaking variables, but
> this isn't an issue any longer so I've removed it as suggested. I've
> attached a new version; the docs for find_package said it was OK to set
> package_VERSION_(MAJOR|MINOR|PATCH) so I've kept these in. I've also
> wrapped the _Xerces_GET_VERSION() call with a check that the include dir is
> valid.
Sorry for the naïve question, but the find_package docs also mentions
setting package_VERSION_COUNT but I don't see any examples of this in
cmake git. Is setting the MAJOR/MINOR/PATCH versions here correct or
redundant or plain wrong? Or all handled internally by
FIND_PACKAGE_HANDLE_STANDARD_ARGS? I'm just a little confused between
the difference between the documentation and the actual examples in
Modules/Find*.
Thanks,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools
`- GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800
More information about the cmake-developers
mailing list