On Sunday 26 August 2012, Russell Wallace wrote: > On Sun, Aug 26, 2012 at 8:55 AM, Eric Noulard <eric.noul...@gmail.com> wrote: > > Like I said even if the new file is a "cpp" file, should CMake add > > it to add_executable or add_library or... > > If different C++ source files have different purposes, I would put > them in different directories. > > > I know that you want to specify the "to be added" file spec using > > a GLOB expression but then what we may need currently would be > > a mechanism to cleanly trigger the refresh or the list of file. > > FILE(GLOB ...) was not meant for that. > > That's okay, I'm happy to trigger the refresh by deleting and > re-creating the build directory.
No need to do that, you can rerun cmake either by manually rerunning it, e.g. in the buildtree simply do "cmake .", or via "make rebuild_cache". So if you use file(GLOB ....) in the CMakeLists.txt to collect your source files, "make rebuild_cache" will rerun cmake and glob again. Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake