[cmake-developers] string SUBSTRING TRUNCATE mode
Brad King
brad.king at kitware.com
Wed Nov 12 11:37:51 EST 2014
On 11/12/2014 10:23 AM, Domen Vrankar wrote:
> I would also prefer implicit behavior but in that case should it still
> be treated as error if CMake minimum required version is set to less
> than 3.1 since it would break on older versions of CMake?
> I know that CMake policies exist but I am not familiar with them...
> Could they be used for this?
Policies are for making backward-incompatible behavior changes for
the better. In this case old code cannot break, so we should not
need a policy.
You could check the value of the CMAKE_MINIMUM_REQUIRED_VERSION
variable to decide whether to make it an error. Extend the error
message to mention that it could be fixed by requiring a new
enough version of CMake. OTOH, there have been many times in the
past where we've converted an error case to a non-error case
without such a check. Projects should test themselves with the
oldest CMake they support anyway. I have no strong feeling on
this requirement.
-Brad
More information about the cmake-developers
mailing list