Quoting Brandon Van Every <[EMAIL PROTECTED]>:

On 8/10/07, Christian Convey <[EMAIL PROTECTED]> wrote:

What I'm trying to avoid is having to go into all 70 of those
subdirectories and modifying each of those 70 CMakeLists.txt files,
adding an INSTALL command to each file.

Why avoid that?  You could just write some regex replaces in CMake
script and make a fairly trivial job out of it.  Or use some other
language you know with regex support, like Ruby.  But for some reason
I think it's cool to use CMake script to modify CMake stuff.

CMake's regex had some bugs and limitations.  ^ and $ are broken with
respect to multi-line input, see bug #5380.  So you end up doing a lot
of \n and (\r?\n) stuff.  Matches are greedy, there's no non-greedy
matching available, which makes some problems difficult.  I've got
code to work around that if you're interested though.

If I already knew Ruby I would have used that, but I didn't.  Ruby
looks like it's got the best regex support, in languages more modern
than Perl.  Python implements regexes externally, not as convenient.

I took a quick look a few weeks ago and replacing the current regex library with PCRE seems "easy" (most of the work would be replacing the regexp's in current .cmake files with their POSIX equivalents). Is Kitware or anyone else already working on that?

--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to