ソースを参照

Merge topic 'fetchcontent-updates-disconnected'

5df592ce31 FetchContent: Ensure can_fetch_default is set early enough
c233c51cb9 ExternalProject: Fix bad indenting for uses_terminal

Acked-by: Kitware Robot <[email protected]>
Tested-by: buildbot <[email protected]>
Acked-by: Silver Zachara <[email protected]>
Merge-request: !9685
Craig Scott 1 年間 前
コミット
31609421f2
1 ファイル変更11 行追加10 行削除
  1. 11 10
      Modules/ExternalProject/shared_internal_commands.cmake

+ 11 - 10
Modules/ExternalProject/shared_internal_commands.cmake

@@ -1386,7 +1386,7 @@ hash=${hash}
       DEPENDS \${depends}
       DEPENDEES mkdir
       ${log}
-  ${uses_terminal}
+      ${uses_terminal}
     )"
   )
 endfunction()
@@ -1520,6 +1520,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")
@@ -1587,11 +1593,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()
 
@@ -1704,7 +1705,7 @@ Update to Mercurial >= 2.1.1.
       DEPENDEES download
       DEPENDS \${file_deps}
       ${log}
-  ${uses_terminal}
+      ${uses_terminal}
     )"
   )
   if(update_disconnected)
@@ -1725,7 +1726,7 @@ Update to Mercurial >= 2.1.1.
         DEPENDEES download
         DEPENDS \${file_deps}
         ${log}
-    ${uses_terminal}
+        ${uses_terminal}
       )"
     )
   endif()
@@ -1816,7 +1817,7 @@ function(_ep_add_patch_command name)
       DEPENDEES update
       DEPENDS \${patch_info_file}
       ${log}
-  ${uses_terminal}
+      ${uses_terminal}
     )"
   )
 
@@ -1829,7 +1830,7 @@ function(_ep_add_patch_command name)
         DEPENDEES update_disconnected
         DEPENDS \${patch_info_file}
         ${log}
-    ${uses_terminal}
+        ${uses_terminal}
       )"
     )
   endif()