mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 19:08:07 +08:00
ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks
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.
This commit is contained in:
@@ -7,7 +7,8 @@ set(quiet "@quiet@")
|
|||||||
set(script_dir "@CMAKE_CURRENT_FUNCTION_LIST_DIR@/ExternalProject")
|
set(script_dir "@CMAKE_CURRENT_FUNCTION_LIST_DIR@/ExternalProject")
|
||||||
include(${script_dir}/captured_process_setup.cmake)
|
include(${script_dir}/captured_process_setup.cmake)
|
||||||
|
|
||||||
if(NOT "@gitclone_infofile@" IS_NEWER_THAN "@gitclone_stampfile@")
|
if(EXISTS "@gitclone_stampfile@" AND EXISTS "@gitclone_infofile@" AND
|
||||||
|
"@gitclone_stampfile@" IS_NEWER_THAN "@gitclone_infofile@")
|
||||||
if(NOT quiet)
|
if(NOT quiet)
|
||||||
message(STATUS
|
message(STATUS
|
||||||
"Avoiding repeated git clone, stamp file is up to date: "
|
"Avoiding repeated git clone, stamp file is up to date: "
|
||||||
|
@@ -7,7 +7,8 @@ set(quiet "@quiet@")
|
|||||||
set(script_dir "@CMAKE_CURRENT_FUNCTION_LIST_DIR@/ExternalProject")
|
set(script_dir "@CMAKE_CURRENT_FUNCTION_LIST_DIR@/ExternalProject")
|
||||||
include(${script_dir}/captured_process_setup.cmake)
|
include(${script_dir}/captured_process_setup.cmake)
|
||||||
|
|
||||||
if(NOT "@hgclone_infofile@" IS_NEWER_THAN "@hgclone_stampfile@")
|
if(EXISTS "@hgclone_stampfile@" AND EXISTS "@hgclone_infofile@" AND
|
||||||
|
"@hgclone_stampfile@" IS_NEWER_THAN "@hgclone_infofile@")
|
||||||
if(NOT quiet)
|
if(NOT quiet)
|
||||||
message(STATUS
|
message(STATUS
|
||||||
"Avoiding repeated hg clone, stamp file is up to date: "
|
"Avoiding repeated hg clone, stamp file is up to date: "
|
||||||
|
Reference in New Issue
Block a user