CMake/Tests/RunCMake/FeatureSummary/FeatureSummaryCustomBadDefault.cmake
Daniele E. Domenichelli 3cfde81835 FeatureSummary: Refactor to use global properties for package types
These new global properties were added:

* FeatureSummary_PKG_TYPES: Package types accepted by FeatureSummary
  (default REQUIRED RECOMMENDED OPTIONAL RUNTIME).
* FeatureSummary_REQUIRED_PKG_TYPES: Package types that will cause
  FeatureSummary to abort when called with
  FATAL_ON_MISSING_REQUIRED_PACKAGES and a package in these categories
  is missing (default REQUIRED).
* FeatureSummary_DEFAULT_PKG_TYPE: Default package type assigned when
  not explicitly assigned by the user (default OPTIONAL).

This allows to add and remove new package types that can be printed
selectively using the "WHAT" argument.
2017-01-26 12:28:12 +01:00

9 lines
201 B
CMake

include(FeatureSummary)
set_property(GLOBAL PROPERTY FeatureSummary_PKG_TYPES TYPE1 TYPE2 TYPE3)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
find_package(Foo)
feature_summary(WHAT ALL)