[CMake] How to build only when file contents are actually changed?

Peng Yu pengyu.ut at gmail.com
Tue Aug 14 10:32:54 EDT 2012


> You miss the point. If CMake wanted to offer hash-based checking, it
> would need to do so for *all* backends, not just GNU Make. Good look
> implementing that hack in Visual Studio or Xcode...

I get your point that there is not an easy to do content based
dependency (hash as an approximation) for all backends. For the reason
mentioned below, I'd think that content based dependency is important.
The support for this feature should be considered first for GNU make,
which does seem to be too difficult (as it just requires some
additional rules). The support for *all* backends can be added later
on one by one.

o Makepp will not recompile if only comments or whitespace in
  C/C++ sources have changed.  This is especially important for header
  files which are automatically generated by other programs and are
  included in many modules.  Even if the date has changed because the
  file was remade, makepp won't recompile if the file hasn't changed.

-- 
Regards,
Peng


More information about the CMake mailing list