首先使用 FetchContent_Declare 命令声明外部项目,并指定其源位置和版本信息。 然后使用 FetchContent_MakeAvailable 命令下载、更新(如果需要)并包含这个外部项目。这会自动执行 FetchContent_Populate(如果需要下载或更新)和 add_subdirectory(包含项目)。3. 提供 fetchcontent_makeavailable 的使用示例 ...
FetchContent_MakeAvailable是 CMake 在FetchContent模块中提供的一个宏。这个宏用于简化在项目中使用通过FetchContent_Declare命令下载并构建的外部依赖项。 该宏的作用是将指定名称(NAME)的外部依赖项设置为可用状态,使其可以被当前项目所使用。通常,在调用FetchContent_MakeAvailable之前,你需要先使用FetchContent_Declare定义...
🔧 use FetchContent_MakeAvailable Verified 5d1e8ff melroy89 commented Feb 22, 2022 Lgtm coveralls commented Feb 22, 2022 • edited Coverage remained the same at 100.0% when pulling 6ba3841 on fetch_content into d1e57df on develop. melroy89 commented Feb 22, 2022 6/73 Test #71:...
Fix for #120: FetchContent_Populate() is deprecated in CMake 3.30, FetchContent_MakeAvailable() is recommended instead #124 Merged abdes merged 1 commit into abdes:master from jolaf:fetchcontent_populate_deprecated Sep 18, 2024 Conversation 1 Commits 1 Checks 39 Files changed Conversation ...