Better CMake Part 10 -- When to use FetchContent

preview_player
Показать описание
Time stamps:

0:00​ - Intro
0:50 - Briefly discuss FetchContent
2:49 - FetchContent for Superbuilds?
4:24 - Example using FetchContent
8:37 - Example for when FetchContent may not be best
12:24 - Don't forget about the ExternalData module!
15:23 - Wrap up

--------------------

Рекомендации по теме
Комментарии
Автор

I’ve found that FetchContent is perfect for grabbing testing frameworks. Tests aren’t part of a project’s API so vendoring this dependency should place no extra burden on packagers who will disable tests while providing a really convenient experience for developers and CI runners who may not have the specific test framework version already installed.

chrisjthrasher
Автор

How do you do this with Boost? I cannot figure that out. I'm using FetchContent to get it, and it configures it, but find_package does not work on it.

Stradigos
Автор

Will you cover CTest for a future video? Btw, love the CMake series :)

oppdatertdejegabonnererpa
Автор

I'm somewhat surprised though that neither the official CMake documentation nor the official CMake book mention any of this apart from the "raw" documentation of the functions.

Crossbow
Автор

I hope it's not the last tutorial episode.

rockywong