[cmake-developers] [PATCH] New module FindXerces

Roger Leigh rleigh at codelibre.net
Sun Aug 17 09:28:59 EDT 2014


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.


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-FindXerces-New-module-to-find-Apache-Xerces-C.patch
Type: text/x-diff
Size: 5711 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140817/87f0a0d3/attachment-0002.patch>


More information about the cmake-developers mailing list