Skip to content

Add option EXCLUDE_FROM_ALL

Compare
Choose a tag to compare
@TheLartians TheLartians released this 16 Feb 10:28
· 107 commits to master since this release
fd539b8

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
)