TriBITS icon indicating copy to clipboard operation
TriBITS copied to clipboard

version checking for TPLs

Open nschloe opened this issue 11 years ago • 4 comments

Most packages not only depend on a TPL, but a certain version or version range thereof. TriBITS needs to support version checking and specification for TPLs.

nschloe avatar Sep 12 '14 13:09 nschloe

@nschloe ,

This is a very hard problem. Requirements and use cases are shown here.

bartlettroscoe avatar Sep 14 '14 12:09 bartlettroscoe

@jwillenbring, you should be aware of this github issue.

bartlettroscoe avatar Sep 15 '14 20:09 bartlettroscoe

Just happened to stumble on this and thought I would document this here.

Note that even CMake 3.0 documentation for FIND_PACKAGE() admits:

Many find-modules provide limited or no support for versioning; check the module documentation.

This will be a hard problem to address.

bartlettroscoe avatar Oct 07 '14 13:10 bartlettroscoe

That's absolutely right: We cannot address the problem globally. What we can do, however, is to try and check the version of TPL if a package requests it, and return an error if the check didn't succeed ("Cannot determine the version of ${TPL}."). That said, for many TPLs, version checking is a matter of grepping around a *_version.h header; it shouldn't be too hard to do.

nschloe avatar Oct 07 '14 13:10 nschloe