Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CMake FetchContent显示下载进度_Cmake - Fatal编程技术网

CMake FetchContent显示下载进度

CMake FetchContent显示下载进度,cmake,Cmake,在使用FetchContent下载git存储库时,是否有某种方式显示下载进度 我试图清除FETCHCONTENT\u QUIET,但没有任何效果。我甚至不知道这是否可能。我刚刚发现我必须在FetchContent\u Declare中使用GIT\u PROGRESS FetchContent_Declare( someTarget GIT_REPOSITORY "https://github.com/someone/someTarget.git" GIT_TAG "tag" GI

在使用FetchContent下载git存储库时,是否有某种方式显示下载进度


我试图清除
FETCHCONTENT\u QUIET
,但没有任何效果。我甚至不知道这是否可能。

我刚刚发现我必须在
FetchContent\u Declare
中使用
GIT\u PROGRESS

FetchContent_Declare(
  someTarget
  GIT_REPOSITORY "https://github.com/someone/someTarget.git"
  GIT_TAG "tag"
  GIT_PROGRESS TRUE
)

说明:要查看
git clone
进度,需要同时设置
FetchContent\u Quiet
git\u进度
,如下例所示

Set(FETCHCONTENT_QUIET FALSE)

FetchContent_Declare(
  someTarget
  GIT_REPOSITORY "https://github.com/someone/someTarget.git"
  GIT_TAG "tag"
  GIT_PROGRESS TRUE
)

您可以指定您使用的平台/生成器吗?我使用的是Windows/ninja,它是否依赖于平台?它可能依赖于平台,但我知道它依赖于您的生成器。对于忍者,您需要在调用
FetchContent\u Declare()
时将
USES\u TERMINAL\u DOWNLOAD
设置为
TRUE
。此外,请参阅CMake维护人员Craig Scott在此CMake页面上的说明。