On 03/07/2013 02:07 PM, Argyrios Kyrtzidis wrote: > On Mar 7, 2013, at 9:59 AM, Brad King <[email protected] > <mailto:[email protected]>> wrote: >> On 03/07/2013 12:32 PM, Jordan Rose wrote: >>> AFAIK libclang is forward-compatible across minor versions, but not >>> backwards (i.e. because new features can be introduced with minor versions). > > That is correct. > >> In that case the logic in the package version file needs to be >> something like: >> >> set(PACKAGE_VERSION @LIBCLANG_LIBRARY_VERSION@) >> if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @CLANG_VERSION_MAJOR@ AND >> NOT "${PACKAGE_FIND_VERSION_MINOR}" GREATER @CLANG_VERSION_MINOR@) >> set(PACKAGE_VERSION_COMPATIBLE 1) >> if("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @CLANG_VERSION_MINOR@) >> set(PACKAGE_VERSION_EXACT 1) # TODO: check patch level too? >> endif() >> endif() > > The versions for the libclang API are > > CINDEX_VERSION_MAJOR > CINDEX_VERSION_MINOR > > in $clang_source/include/clang-c/Index.h
Great. Damien, please fold this into your next patch revision. You can use file(STRINGS) to parse the values out of the header. Thanks, -Brad _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
