On Wed, 28 May 2014 16:17:39 -0400 Brad King <brad.k...@kitware.com> wrote:
> On 05/28/2014 01:20 PM, Alessandro Di Federico wrote: > > Hi, I'm working on a quite big project, namely LLVM. As you can > > imagine, launching a `make install` it's quite time consuming, in > > particular in Debug builds. However I'm using a smart file system > > (BTRFS on Linux) which supports "reflinks", which basically means > > that it's possible to create copy-on-write duplicate of a file, > > without having to write the file contents again. This can be easily > > done using `cp` (from the GNU Coreutils) with the --reflink > > parameter. > > Neat. How is it known when a reflink is safe (e.g. on the same > filesystem)? Does it just fall back to a normal copy otherwise? Take a look at `man cp`, there's `--reflink=auto` which uses CoW when possible or normal copy otherwise. For some reason it's not the default in `cp`, probably because it's a bit slower since you need to check if the underlying file system supports reflinks. > This would likely go in the implementation of the file(INSTALL) > command used internally by the installation infrastructure. > See SystemTools::CopyFileAlways in Source/kwsys/SystemTools.cxx. > That method could probably be optimized anyway. OK, I'll come up with a patch. The only thing is that --reflink has been introduced around 2009, in coreutils 7.6 (we are currently at 8.22). Is it OK to assume we have such coreutils or some kind of (build-time?) detection is needed? -- Ale -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers