diff options
author | Bartosz Kosiorek <bartosz.kosiorek@tomtom.com> | 2019-03-19 13:59:23 (GMT) |
---|---|---|
committer | Bartosz Kosiorek <bartosz.kosiorek@tomtom.com> | 2019-03-19 14:17:55 (GMT) |
commit | 8f723e48b8ee79909209ec27ab3a3c979983e34d (patch) | |
tree | 41b800146b5917f0c904d2daff11b539af41d41f /Modules/ExternalProject.cmake | |
parent | bca0c162230f0391a7cc701922b69d44532b7ebc (diff) | |
download | CMake-8f723e48b8ee79909209ec27ab3a3c979983e34d.zip CMake-8f723e48b8ee79909209ec27ab3a3c979983e34d.tar.gz CMake-8f723e48b8ee79909209ec27ab3a3c979983e34d.tar.bz2 |
ExternalProject: Optimize Mercurial commands
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 777c721..948b921 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1167,18 +1167,12 @@ endif() endfunction() function(_ep_write_hgclone_script script_filename source_dir hg_EXECUTABLE hg_repository hg_tag src_name work_dir hgclone_infofile hgclone_stampfile) + if("${hg_tag}" STREQUAL "") + message(FATAL_ERROR "Tag for hg checkout should not be empty.") + endif() file(WRITE ${script_filename} -"if(\"${hg_tag}\" STREQUAL \"\") - message(FATAL_ERROR \"Tag for hg checkout should not be empty.\") -endif() - -set(run 0) - -if(\"${hgclone_infofile}\" IS_NEWER_THAN \"${hgclone_stampfile}\") - set(run 1) -endif() - -if(NOT run) +" +if(NOT \"${hgclone_infofile}\" IS_NEWER_THAN \"${hgclone_stampfile}\") message(STATUS \"Avoiding repeated hg clone, stamp file is up to date: '${hgclone_stampfile}'\") return() endif() @@ -1215,7 +1209,6 @@ execute_process( COMMAND \${CMAKE_COMMAND} -E copy \"${hgclone_infofile}\" \"${hgclone_stampfile}\" - WORKING_DIRECTORY \"${work_dir}/${src_name}\" RESULT_VARIABLE error_code ) if(error_code) |