On 05/29/2013 12:42 PM, Robert Dailey wrote:
> I like your idea of using an external script to handle this, however,
> there is certain state I need access to from the last CMake run.
> Specifically, I have a variable with all of the 'bin' directories
> where DLLs can be found. To avoid recursive searching in my custom
> target script to find them each time I build, I suppose I could store
> them in a cache variable? I was just going to create a CMake script
> that I run from the custom target.

Configure the script with the list as part of its source using
configure_file.

> The reason I went with custom commands to begin with is because I
> originally used cmake's copy_if_different command, but it turned out
> to be MUCH slower than the out of date checks that the custom command
> did.

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".

-Brad
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to