Skip to content

Teach FetchContent_MakeAvailable to pass EXCLUDE_FROM_ALL

Oftentimes when using FetchContent, you will only be interested in building targets that you have an explicit dependency on, not any that just happen to be in the fetched project's ALL target. This lets you specify that behavior in FetchContent_MakeAvailable. Before you had to either set the EXCLUDE_FROM_ALL property on the subidrectory yourself (using FetchContent_GetProperties to figure out what that directory was called) or you had to set the EXCLUDE_FROM_ALL property globally on the directory in which FetchContent_MakeAvailable was called.

Edited by Charlie Barto

Merge request reports