[cmake-developers] Could a cmake_maximum_required() work?
Brad King
brad.king at kitware.com
Wed Apr 25 14:42:43 EDT 2012
On Wed, Apr 25, 2012 at 2:17 PM, Stephen Kelly <steveire at gmail.com> wrote:
> Brad King wrote:
>> I don't think that's the opposite of a minimum required version, I
>> think that *is* one.
>
> I'm having trouble parsing this. What does 'It is one' mean?
It is the same as a minimum required version. If users are allowed to
run an old CMake version then that version is the maximum feature set
allowed.
>> The same error could be generated just from
>>
>> cmake_minimum_required(VERSION 2.8.8)
>
> You mean we could make using this command also set the maximum version to
> allow use of API from?
Yes. The concepts are the same. I do not think the implementation
and maintenance burden is worthwhile though.
> I'm not certain it would be hard to implement, but yes, it would be an
> increased maintenance burden.
Every feature added would need to test the minimum required CMake
version to see if it is allowed. This could include changes in
CMake-language code in the Modules directory. It would also make the
command argument parsing even more complicated.
> Given that, if someone in KDE wants to use an if() conditional on CMake
> version, the feature would either have to be implemented another way, or the
> minimum CMake version would need to be increased.
...or it is for a "nice to have" feature convenient for developers
using newer CMake versions but that is not required to build for
distribution.
-Brad
More information about the cmake-developers
mailing list