[cmake-developers] How to fix FindSquish.cmake wrt. backward compatibility ?
Alexander Neundorf
neundorf at kde.org
Sun Nov 4 12:28:46 EST 2012
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 ?
Comments ?
Alex
More information about the cmake-developers
mailing list