I also posted this to stackoverflow (http://stackoverflow.com/q/17935748/889604) where I now have an answer (and some more discussions) along similar lines to the 1 given below.
On 31 July 2013 20:50, Glenn Coombs <[email protected]> wrote: > 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. > > You could just list the known items that you do want to ignore. Something > like this: > > set(CPACK_SOURCE_IGNORE_FILES "/build/;/extrafiles/;/temp/") > > will hopefully ignore directories called build, extrafiles and temp. It > isn't exactly what you want but might help. > > On 29 July 2013 19:40, Chris Wood <[email protected]> wrote: >> >> I'm trying to get my head round CMake's regex implementation; I have a >> folder containing 4 folder and 2 text files: >> >> build/ >> projectA/ >> CMakeLists.txt >> extrafiles/ >> README >> temp/ >> >> one line of CMakeLists.txt is: >> >> set(CPACK_SOURCE_IGNORE_FILES "[^projectA]$") >> >> in my source package that is ten subsequently generated, `build/` >> `projectA/` and `extrafiles` are present, but `temp/` and the 2 text >> files are not. I'm trying to get to a stage where the regex will >> ignore everything in the folder except for `projectA/`, `README` and >> `CMakeLists.txt`, but can't work out at the moment how the regex I've >> supplied is giving those results. >> >> Any insight will be greatly appreciated! >> >> Chris >> -- >> >> Powered by www.kitware.com >> >> Please keep messages on-topic and check the CMake FAQ at: >> http://www.cmake.org/Wiki/CMake_FAQ >> >> Kitware offers various services to support the CMake community. For more >> information on each offering, please visit: >> >> CMake Support: http://cmake.org/cmake/help/support.html >> CMake Consulting: http://cmake.org/cmake/help/consulting.html >> CMake Training Courses: http://cmake.org/cmake/help/training.html >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Follow this link to subscribe/unsubscribe: >> http://www.cmake.org/mailman/listinfo/cmake > > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
