From c233c51cb96468458eb5f5540f468d489954da2e Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Fri, 26 Jul 2024 10:58:19 +1000 Subject: ExternalProject: Fix bad indenting for uses_terminal --- Modules/ExternalProject/shared_internal_commands.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/ExternalProject/shared_internal_commands.cmake b/Modules/ExternalProject/shared_internal_commands.cmake index acd97f1..ef0c6d9 100644 --- a/Modules/ExternalProject/shared_internal_commands.cmake +++ b/Modules/ExternalProject/shared_internal_commands.cmake @@ -1394,7 +1394,7 @@ hash=${hash} DEPENDS \${depends} DEPENDEES mkdir ${log} - ${uses_terminal} + ${uses_terminal} )" ) endfunction() @@ -1719,7 +1719,7 @@ Update to Mercurial >= 2.1.1. DEPENDEES download DEPENDS \${file_deps} ${log} - ${uses_terminal} + ${uses_terminal} )" ) if(update_disconnected) @@ -1740,7 +1740,7 @@ Update to Mercurial >= 2.1.1. DEPENDEES download DEPENDS \${file_deps} ${log} - ${uses_terminal} + ${uses_terminal} )" ) endif() @@ -1831,7 +1831,7 @@ function(_ep_add_patch_command name) DEPENDEES update DEPENDS \${patch_info_file} ${log} - ${uses_terminal} + ${uses_terminal} )" ) @@ -1844,7 +1844,7 @@ function(_ep_add_patch_command name) DEPENDEES update_disconnected DEPENDS \${patch_info_file} ${log} - ${uses_terminal} + ${uses_terminal} )" ) endif() -- cgit v0.12 From 5df592ce31cbcf278e9742552f36ba2a9a46c3b7 Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Fri, 26 Jul 2024 11:23:58 +1000 Subject: FetchContent: Ensure can_fetch_default is set early enough The can_fetch_default variable needs to be set before the call to _ep_write_gitupdate_script(). Move it to before that call and always set the variable, even if arg_SCRIPT_FILE is not set. This makes the generated git update script file easier to follow if someone tries to follow what it is doing or wants to investigate problems and run it manually. Fixes: #26164 --- Modules/ExternalProject/shared_internal_commands.cmake | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Modules/ExternalProject/shared_internal_commands.cmake b/Modules/ExternalProject/shared_internal_commands.cmake index ef0c6d9..a709670 100644 --- a/Modules/ExternalProject/shared_internal_commands.cmake +++ b/Modules/ExternalProject/shared_internal_commands.cmake @@ -1535,6 +1535,12 @@ function(_ep_add_update_command name) set(comment "Performing update step for '${name}'") set(comment_disconnected "Performing disconnected update step for '${name}'") + if(update_disconnected) + set(can_fetch_default NO) + else() + set(can_fetch_default YES) + endif() + set(git_tag "${_EP_GIT_TAG}") if(NOT git_tag) set(git_tag "master") @@ -1602,11 +1608,6 @@ function(_ep_add_update_command name) set(always 1) if(arg_SCRIPT_FILE) - if(update_disconnected) - set(can_fetch_default NO) - else() - set(can_fetch_default YES) - endif() set(step_script_contents "include(\"${update_script}\")") endif() -- cgit v0.12