[cmake-developers] Need some pointers on learning the code

Robert Dailey rcdailey.lists at gmail.com
Wed May 29 14:46:52 EDT 2013


On Wed, May 29, 2013 at 1:22 PM, Brad King <brad.king at kitware.com> wrote:
> Configure the script with the list as part of its source using
> configure_file.

Simply brilliant. I love the ideas you're giving me here. I've been
using CMake for years but I still miss out on coming up with good
ideas like this.

> If you go with the external script approach use the file(COPY)
> command.  It uses a timestamp-based decision so incremental updates
> are very fast.  Underneath it is the same logic used by CMake in its
> implementation of "make install".

Interesting, I always thought file(COPY) did a forced copy each time.
Going back over the documentation for it, I now see that this is
indeed documented but the wording is a bit strange so I never realized
this behavior.

Thanks a ton Brad, this saves me a ton of effort. However I still do
agree about generator expressions in OUTPUT, so I still plan to pick
this up when I can. 99% of the time I spend is digging through the
code & debugging things, to try to understand how things work.



More information about the cmake-developers mailing list