[Interest] Do not generate files if exists or doesn't modified...

Till Oliver Knoll till.oliver.knoll at gmail.com
Mon Sep 22 16:05:48 CEST 2014


Am 22.09.2014 um 10:37 schrieb "Igor Mironchik" <igor.mironchik at gmail.com>:

> Hi.
>  
> ...
>  
> How can I do that this files will generates only if they are not exists or if .proto file was modified?

For the first part of your question refer to qmake's internal functions, specifically "exists(filename)".

For the later you probably need to set a valid dependency. Currently you seem to have it set to "FORCE", which I strongly assume will cause that header file to be always generated (and hence all dependent files /need/ to be recompiled).

How you achieve that with a custom build step I am not sure. Maybe execute a (platform specific?) shell command which returns you the time stamps of your source and generated file (which might even save you the "exists" test, if that "last modified time stamp command" returns a meaninful unique value on a non-existent file path). Comparing those should give you a valid condition upon which you can decide whether the custom build step is necessary or not.

Maybe there's an easier/built-in way to conditionally process a custom build step based on time stamps...

Cheers,
  Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140922/bca621a5/attachment.html>


More information about the Interest mailing list