[cmake-developers] slow regex implementation in RegularExpression

Bill Hoffman bill.hoffman at kitware.com
Wed Nov 23 12:06:35 EST 2011


On 11/23/2011 11:43 AM, James Bigler wrote:

>
> Why can't this be solved with a policy?  One problem of using an
> explicit TRE command is that if you want to write code that *could* be
> used in an older version of CMake you won't be able to use it.
>
It could be, but that will not come without pain.  I can see a future 
were this policy kept off in many projects.

> I agree that making the usage explicit would allow for complete backward
> compatibility, but it clutters the language.  Do you want to have two
> versions of evegry regular expression syntax?  GLOB vs GLOB_TRE? MATCHES
> vs MATCHES_TRE?
>
> Another argument against using TRE explicitly is these words tell me
> nothing about what that function does unless I'm extremely familiar with
> the intricacies of CMake script.  I think we want to make CMake easier
> to use, not harder.

For many folks the current regex is just fine, so they will not have to 
do anything.  Only the people that have hit some sort of wall with the 
regex will "need" to change.  If we have a policy, I can see projects 
changing the minimum required version and having a subtle bug show up 
because the regex changed.


I don' think we even know what all the differences are at this point...

-Bill



More information about the cmake-developers mailing list