Skip to content

ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks

Craig Scott requested to merge craig.scott/cmake:ep-IS_NEWER_THAN into master

This change was originally made in !5825 (merged) by commit 404cddb7 (ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks, 2021-02-21), but was reverted in !5898 (merged) by commit 57d442e1 (Revert ExternalProject and FetchContent refactoring, 2021-03-10) due to regressions from other changes. Reapply this fix on its own, since it is still valid.

When using a file system which only has second resolution timestamps, there is a reasonably high likelihood of timestamps being the same. The IS_NEWER_THAN test returns true when timestamps are the same, so don't redo downloads when they match exactly.

Topic-rename: ExternalProject-IS_NEWER_THAN

Merge request reports