<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Mar 7, 2013, at 9:59 AM, Brad King <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">On 03/07/2013 12:32 PM, Jordan Rose wrote:<br><blockquote type="cite"><br>On Mar 7, 2013, at 6:42 , Brad King <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> wrote:<br><br><blockquote type="cite">One thing the upstream devs should check is whether the version test<br>in libclang-config-version.cmake.in looks correct. The logic needs to<br>match your interface compatibility and versioning policy. Currently<br>it says that versions will be forward and backward compatible across<br>all minor versions of the same major version, and that a change in<br>major version breaks compatibility. This is a reasonable policy, but<br>this code needs to match your actual policy.<br></blockquote><br>AFAIK libclang is forward-compatible across minor versions, but not<br>backwards (i.e. because new features can be introduced with minor versions).<br></blockquote></div></blockquote><div><br></div><div>That is correct.</div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><br>In that case the logic in the package version file needs to be<br>something like:<br><br>set(PACKAGE_VERSION @LIBCLANG_LIBRARY_VERSION@)<br>if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL @CLANG_VERSION_MAJOR@ AND<br> NOT "${PACKAGE_FIND_VERSION_MINOR}" GREATER @CLANG_VERSION_MINOR@)<br> set(PACKAGE_VERSION_COMPATIBLE 1)<br> if("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @CLANG_VERSION_MINOR@)<br> set(PACKAGE_VERSION_EXACT 1) # TODO: check patch level too?<br> endif()<br>endif()<br><br></div></blockquote><div><br></div><div>The versions for the libclang API are </div><div><br></div><div>CINDEX_VERSION_MAJOR</div><div><div>CINDEX_VERSION_MINOR</div><div><br></div><div>in $clang_source/include/clang-c/Index.h</div><div><br></div></div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">-Brad</div></blockquote></div><br></body></html>