[cmake-developers] slow regex implementation in RegularExpression

Brad King brad.king at kitware.com
Thu Nov 17 15:57:36 EST 2011


On 11/17/2011 3:33 PM, Alexandru Ciobanu wrote:
> On 2011-11-17, at 3:26 PM, Alexander Neundorf wrote:
>> Not sure how to achieve this.
>> A policy ?
>>
>
> Actually it is very easy to make it transparent and thus not need to modify any .cmake files.
>
> We just need to escape the curly brackets:
>     {   ->    \{
>     }   ->    \}
> in the regular expression before compiling it.

Well, as part of this we would like to offer the new matching capabilities
from using that syntax.

This would be an appropriate use of a policy.  The OLD behavior would
escape { and } and the NEW behavior would not escape them (but of course
the user could escape them anyway).  The old regex implementation could
be dropped completely.  However, there may be contexts in which a regular
expression appears but we don't have a way to define the policy setting.
That will take some investigation.

-Brad



More information about the cmake-developers mailing list