[CMake] Re: General modernization facility

Brandon Van Every bvanevery at gmail.com
Tue Dec 18 15:02:41 EST 2007


On Dec 18, 2007 2:36 PM, Rodolfo Schulz de Lima <rodolfo at rodsoft.org> wrote:
> Brandon Van Every wrote:
>
> >> Hint: there's already the
> >> cmake_minimum_required command (at least in cmake-cvs, that is)...
> >
> > cmake_minimum_required has been around for awhile now.  It does not
> > solve the problem.
>
> Why is it so? If I'm using, say, 2.10.0 stuff, I'd issue a
> cmake_minimum_required(VERSION 2.10.0 FATAL_ERROR) and cmake would
> behave without having to cope with backwards compatibilities.

Let's say really old code does cmake_minimum_required(VERSION 2.2.0
FATAL_ERROR).  CMake 2.6.0 meets that minimum requirement.  It should
run the old code correctly, unless there's a really really good reason
to break backwards compatibility.  CMake 2.6.0 isn't going to have
CMAKE_REQUIRE_BOOL, or any such newfangled change, as default
behavior.  It would break old code.  cmake_minimum_required is a
*minimum* requirement, not an exact requirement or a maximal
requirement.

We have to get from 2.6.0 to 2.8.0 to 2.10.0.  Sure, in the distant
future, CMAKE_REQUIRE_BOOL could be default behavior and
cmake_minimum_required(VERSION 2.10.0 FATAL_ERROR) would be sufficient
to enforce it.  But we're not there yet.  We'll have to go through 1,
maybe 2 generations of CMake before enough people have voted with
their feet to retire the legacy behavior.  2 generations before CMake
is allowed to break ancient "Y" "N" "Yes" "No" "ON' "OFF" code with
impunity.  And that's assuming people actually like bool() and adopt
it wholesale.  For any given feature, it's quite possible that the
community will not accept it wholesale.  In the worst case, we could
be selecting CMAKE_REQUIRE_BOOL as an option indefinitely.


Cheers,
Brandon Van Every


More information about the CMake mailing list