[cmake-developers] How to fix FindSquish.cmake wrt. backward compatibility ?

David Cole david.cole at kitware.com
Sun Nov 4 19:00:48 EST 2012


I would prefer squish3_add_test and squish4_add_test, as the version number goes with squish, not with the add_test... Keep the old macros and functions with the same name and same meaning please. We've had too many backwards incompatible complaints in 2.8.10 after only a few days out in the real world.

I am not aware of anybody actually using FindSquish successfully. (But of course it's possible somebody out there is.) Perhaps a wider survey is in order...


On Nov 4, 2012, at 12:56 PM, Alexander Neundorf <neundorf at kde.org> wrote:

> On Sunday 04 November 2012, Alexander Neundorf wrote:
>> Hi,
>> 
>> I finally want to commit my changes to FindSquish.cmake upstream.
>> FindSquish.cmake as it comes with cmake does not work at all with squish
>> version 4.x.
>> The documentation of FindSquish.cmake says it is currently aimed at version
>> 3. This is this bug: http://public.kitware.com/Bug/view.php?id=9734
>> 
>> There have been no (zero) commits to FindSquish.cmake after its initial
>> commit, except of cleanup commits:
>> http://cmake.org/gitweb?p=cmake.git;a=history;f=Modules/FindSquish.cmake;h=
>> HEAD;hb=next
>> 
>> 
>> I suspect that FindSquish.cmake as it comes with cmake does not work with
>> squish 4.x because squish may have changed from 3.x to 4.x. But this is
>> just guessing, I don't have squish 3.x available.
>> 
>> So, how should I proceed ?
>> 
>> 1) Add a FindSquish4.cmake, which works with squish 4, and leave
>> FindSquish.cmake untouched ?
>> 
>> 2) Just make FindSquish.cmake work with squish 4.x, and ignore that this
>> may break it for squish 3.x ? (...maybe this wouldn't be a real problem,
>> as there is no bug report for FindSquish.cmake in the bug tracker (except
>> the one I filed #9734). So maybe nobody is using it with squish 3.x ?
>> 
>> 3) Detect the version in FindSquish.cmake, and do different things if
>> version 3 or version 4 are detected ? FindSquish.cmake provides a macro
>> squish_add_test(). The syntax for using it has changed with my changes for
>> squish 4. So, should FindSquish.cmake provide a macro squish_add_test()
>> with one set of parameters if version 3 is found, and a function also
>> named squish_add_test() with a different set of parameters if squish 4 is
>> found ? This doesn't feel good to me, having a function with the same name
>> but different arguments depending on the version which was found.
>> Or should it provide squish_add_test_v4() is version 4 is found ?
> 
> I think I'll add a squish_add_test3() which will be a wrapper for the current 
> squish_add_test(), and additionally a new squish_add_test4() which will work 
> for version 4.
> 
> Does that sound ok ?
> 
> Alex
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers



More information about the cmake-developers mailing list