The regexp you're using matches anything where the last character at the end of the line isn't one of the characters inside the square brackets. I don't think cmake's regexps allow negation of words so specifying a regexp that matches everything except projectA/, README and CMakelists.txt is going to be tricky.<br>
<br>You could just list the known items that you do want to ignore. Something like this:<br><br>set(CPACK_SOURCE_IGNORE_FILES "/build/;/extrafiles/;/temp/")<br><br>will hopefully ignore directories called build, extrafiles and temp. It isn't exactly what you want but might help.<br>
<br><div class="gmail_quote">On 29 July 2013 19:40, Chris Wood <span dir="ltr"><<a href="mailto:c.c.wood@gmail.com" target="_blank">c.c.wood@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm trying to get my head round CMake's regex implementation; I have a<br>
folder containing 4 folder and 2 text files:<br>
<br>
build/<br>
projectA/<br>
CMakeLists.txt<br>
extrafiles/<br>
README<br>
temp/<br>
<br>
one line of CMakeLists.txt is:<br>
<br>
set(CPACK_SOURCE_IGNORE_FILES "[^projectA]$")<br>
<br>
in my source package that is ten subsequently generated, `build/`<br>
`projectA/` and `extrafiles` are present, but `temp/` and the 2 text<br>
files are not. I'm trying to get to a stage where the regex will<br>
ignore everything in the folder except for `projectA/`, `README` and<br>
`CMakeLists.txt`, but can't work out at the moment how the regex I've<br>
supplied is giving those results.<br>
<br>
Any insight will be greatly appreciated!<br>
<br>
Chris<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>