Download [patched]_extract_timestamp Fetch Content Direct

The command is a critical option within CMake's dependency management modules, specifically FetchContent and ExternalProject_Add . It dictates whether files extracted from a downloaded archive (like a .zip or .tar.gz ) should keep their original timestamps from the archive or be updated to the current time of extraction. Why This Option Matters

When you use FetchContent_Declare to download external libraries, CMake needs to know if the content has changed to decide whether to rebuild it. download_extract_timestamp fetch content

Extracted files kept the timestamps they had inside the original archive. If you updated the download URL to a new version, but the new files had "old" timestamps, CMake might think they hadn't changed and skip the rebuild, leading to broken builds . The command is a critical option within CMake's

To use this feature and silence CMP0135 policy warnings, you can explicitly set the option in your CMakeLists.txt file: include(FetchContent) FetchContent_Declare( googletest URL Use code with caution. Extracted files kept the timestamps they had inside

CMake now prefers setting extracted file timestamps to the time of extraction . This ensures that any updated content is always seen as "new," triggering necessary rebuilds. How to Implement It