[cmake-developers] slow regex implementation in RegularExpression

Brad King brad.king at kitware.com
Wed Nov 23 12:44:01 EST 2011


On 11/23/2011 12:20 PM, Alexandru Ciobanu wrote:
> The solution is to use the old regex code everywhere, except for the
> very specific place where it causes problems.

I maintain that the proper long-term solution is to use a policy
to fully replace the old impl with TRE.  Exposing it through a
separate interface makes the end result more complicated as James
pointed out.  It's akin to finding a C++ class that does almost
what you need and copying/modifying it instead of refactoring the
needed parts into a common superclass.  It's less work up front
but makes things a lot harder to maintain.

However, the above does not need to stand in the way of solving the
problem you're addressing.  We can simply set that goal aside for
now by not exposing TRE in the CMake language anywhere.  Use it
just for cmCTestBuildHandler.

> In this case, it is safe to use TRE, because we (the CMake developers)
> write these regular expressions, and we can make sure they work with TRE.

We also support project-specified regular expressions, don't we?

-Brad



More information about the cmake-developers mailing list