thanks it works. I've add to use EXECUTE_PROCESS in my remove_some_file.cmake file.
Alexandre On Fri, Mar 12, 2010 at 1:53 PM, Eric Noulard <[email protected]> wrote: > 2010/3/12 Alexandre Gramfort <[email protected]>: >> Hi, >> >> is there a way to have cmake do something like : >> >> cmake -E remove /path/*.txt >> >> I need to clear tests outputs before running new tests. I have a >> solution with a GLOB but the list of files is set during cmake >> configure >> so it does not work if I run "make test" twice without reconfiguring. > > When you want build time evaluation you may write a CMake script > > remove_some_file.cmake which: > 1) does the GLOB for building the LIST_OF_FILE > 2) execute_process cmake -E remove ${LIST_OF_FILE} > > then in your CMakeLists.txt you add a custom_command/target which > executes: > > cmake -P remove_some_file.cmake. > > That way the list of file will be built at "build" time. > > -- > Erk > Membre de l'April - « promouvoir et défendre le logiciel libre » - > http://www.april.org > _______________________________________________ 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
