[CMake] add_custom_command: regenerate all on modifcation?

Dave Milter davemilter at gmail.com
Tue Jun 3 06:43:08 EDT 2008


On 6/3/08, Brad King <brad.king at kitware.com> wrote:
> Bill Hoffman wrote:
>> Dave Milter wrote:
>>> cmake version 2.4-patch 8
>>>
>>> and it not regenerates ui_foo.hpp after uncomment foo2.cpp,
>>> so it is regression, or previous (good for me behaviour) cause many bugs?
>>>
>> It is not a bug.  It was a bug fix.  If you changed a custom command in
>> 2.4 the rule would not re-run.  Now the custom commands re-run if
>> build.make changes.
>
> The dependency on build.make is too aggressive in rebuilding custom
> commands.  I've committed changes to CMake HEAD in CVS to make rules
> re-run when changed without a dependency on build.make.  Now we use a
> persistent "rule hash" file to delete custom command outputs during
> build system generation if their build rules have changed.
>
> If you can please try CMake HEAD from CVS to make sure it solves your
> problem.  We'll include the fix in a 2.6 patch release.
>

I tried, not sure how to see global repository history, cvs log works
not how svn log works, but I see commit:
--------------------------------------------------------------------------------
date: 2008-06-03 00:45:06 +0400;  author: king;  state: Exp;  lines:
+5 -20;  commitid: 85BkbyJ6bFjMQp5t;
ENH: Remove SKIP_RULE_DEPENDS option from add_custom_command()

  - Option was recently added but never released.
  - Custom commands no longer depend on build.make so we do
    not need the option.
  - Rule hashes now take care of rebuilding when rules change
    so the dependency is not needed.
--------------------------------------------------------------------------------

and it is NOT work, at least with example which I sent with one of
previous emails.


More information about the CMake mailing list