[CMake] Re: General modernization facility

Rodolfo Lima rodolfo at rodsoft.org
Tue Dec 18 20:32:12 EST 2007


Brandon Van Every escreveu:

>> We would have to guarantee that version 2.4.7 executes correctly every
>> script made up till now.
> 
> I don't see how we could.

Well, Kitware has always been concerned with backward compatibility, so
every script out there would work with cmake-2.4.7. I'd also throw
cmake-cvs in the mix, since they still fight hard to maintain backward
compatibility.

> The author may have been completely unaware of the potential of the
> error condition, having never seen the circumstances in which the
> error occurs.  We don't know that "I wrote this using 2.4.7" means "I
> want it frozen for 2.4.7."  Let's even say, for sake of argument, that
> you provided an interface for the author to state exactly that.
> version_freeze(2.4.7).  It still may not be a good idea, because the
> author may not have full knowledge of the consequences of his
> decision.

But if you correct the behaviour, the script wouldn't work as expected.
Is this a good thing? Can you create an example of such error condition?
I'm not saying that version_freeze(2.4.7) should maintain all bugs of
cmake-2.4.7. No, those bugs should be corrected. Only the interface to
the user would be frozen. For instance, version_freeze(2.4.7) would
interpret Y, TRUE, YES as being the same thing. version_freeze(2.6.0)
wouldn't.

>> I don't think we need to tie "disruptive" features to version numbers.
>  I want set_property(GLOBAL PROPERTIES CMAKE_REQUIRE_BOOL TRUE).  I'm
> willing to wait a loooooong time for it to become a default CMake
> behavior.  I think include(Modern) is a good idea in principle, for
> people who want to use a well-defined collection of forward looking
> behaviors.  The idea may need refinement in practice, but the general
> idea is "opt in."  Not "tie my hands."

If you turn something into default behavior, it'll break backward
compatibility. And as time goes by, the amount of disruptive features
tends to grow. In the future to write a script I would have to write lot
of set_property(GLOBAL PROPERTIES CMAKE_REQUIRE...)... It'd be better to
specify the version of cmake I'm working on and that's it.

Regards,
rod

PS: feel free to correct any English mistakes I make. I won't learn if I
keep writing wrongly.



More information about the CMake mailing list