"Christian Z." <
chri...@zuckschwerdt.org> writes:
> Incremental builds work, but touching Git will do a full rebuild.
>
> $ cmake -GNinja -B build
> ...
> $ cmake --build build
> ...
> [349/349] Linking C executable src/rtl_433
> $ cmake --build build
> ninja: no work to do.
> $ date >>README.md
> $ git add README.md
> $ git commit -m 'testing'
> $ cmake --build build
> ...
> [349/350] Linking C executable src/rtl_433
>
> The dependency that causes this are the ADD_DEFINITIONS() for Git info in
> the main CMakeLists.txt (around line 39).
That explains it
> Remove or replace them to always get Incremental builds. Maybe writting
> that info as #define's to a header file could fix the dependencies?
Generally, it seems best to put the version in version.h and only build
a version.c that references it, to avoid this sort of mass-rebuild
dependency.