diff options
author | Craig Scott <craig.scott@crascit.com> | 2022-01-10 00:47:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-01-10 00:47:07 (GMT) |
commit | 055d574084479cbe2299f2c8b2d78ef4b33fd54d (patch) | |
tree | c5d13c1adcece63044b2241f0bad1cf0d3f0f451 | |
parent | 290a0da3d7c0bacd5885eb6b0060ede7951699b2 (diff) | |
parent | d73fc5dd2a54264b8437be89b849de99c8bd370b (diff) | |
download | CMake-055d574084479cbe2299f2c8b2d78ef4b33fd54d.zip CMake-055d574084479cbe2299f2c8b2d78ef4b33fd54d.tar.gz CMake-055d574084479cbe2299f2c8b2d78ef4b33fd54d.tar.bz2 |
Merge topic 'ExternalProject-IS_NEWER_THAN'
d73fc5dd2a ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6847
-rw-r--r-- | Modules/ExternalProject.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 4004ea4..fc15a0f 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1302,7 +1302,8 @@ function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git file(WRITE ${script_filename} " -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}\") message(STATUS \"Avoiding repeated git clone, stamp file is up to date: '${gitclone_stampfile}'\") return() endif() @@ -1378,7 +1379,8 @@ function(_ep_write_hgclone_script script_filename source_dir hg_EXECUTABLE hg_re endif() file(WRITE ${script_filename} " -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}\") message(STATUS \"Avoiding repeated hg clone, stamp file is up to date: '${hgclone_stampfile}'\") return() endif() |