Add option EXCLUDE_FROM_ALL
This adds an optional parameter EXCLUDE_FROM_ALL
that prevents packages from leaking unwanted targets (such as tests, examples) to CPM.cmake projects. See #152 and #198 for details.
Usage example
CPMAddPackage(
NAME googletest
GITHUB_REPOSITORY google/googletest
VERSION 1.8.0
GIT_TAG release-1.8.0
# prevent googletest targets from leaking into all
EXCLUDE_FROM_ALL YES
)