<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 2011-11-17, at 3:59 PM, Brad King wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On 11/17/2011 3:19 PM, Alexandru Ciobanu wrote:<br>> I was able to make CMake use TRE, by changing the<br>> RegularExpression.{cxx,hxx.in} files.<br><br>Those are down in Source/kwsys which is a directory shared by<br>projects other than just CMake.  We cannot touch the files there.<br>Instead you will need to re-factor things to go through a wrapper.<br>The first stage will just wrap up the KWSys regular expression API.<br>The second stage will replace the implementation with TRE.<br><br><blockquote type="cite">- Does anyone see a problem if we add TRE in CMake the same<br></blockquote>> way as ZLIB, CURL, etc? (i.e. in ./Utilities/)<br><br>That should be fine.<br><br>-Brad<br></div></blockquote></div><br><div><br></div><div>Hi,</div><div><br></div><div>As Brad King suggested, instead of changing the files in Source/kwsys/, I created a wrapper class and made all the calls go through it.</div><div><br></div><div>I also added the TRE library to Utilities/cmtre, and added CMAKE_USE_SYSTEM_TRE.</div><div><br></div><div>I added the patch to the bug tracker:</div><div>     <a href="http://public.kitware.com/Bug/view.php?id=12381">http://public.kitware.com/Bug/view.php?id=12381</a></div><div><br></div><div>Needless to say, the patch fixes the performance problem.</div><div><br></div><div>To keep things simple I omitted several things:</div><div>   - TRE library bootstrapping (so now the Bootstrap test will fail)</div><div>   - the suggested policy to enable/disable approximate matching in TRE </div><div>   - proper checks when building TRE with CMake as done in its ./configure.ac </div><div><br></div><div>Before I spend more time on that I would like to get some feedback, and namely:</div><div>   - Is the approach correct?</div><div>   - What next?</div><div><br></div><div>sincerely,</div><div>Alex Ciobanu</div></body></html>