summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <ddomenichelli@drdanz.it>2017-02-03 14:32:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-06 19:44:23 (GMT)
commitf9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7 (patch)
tree596dbd4ad5906f0ab433e992fc315f64ba39b519 /Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake
parentfddc01bab3352d12c0eba1ff781b359a7dec529c (diff)
downloadCMake-f9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7.zip
CMake-f9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7.tar.gz
CMake-f9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7.tar.bz2
FeatureSummary: Add DEFAULT_DESCRIPTION option to feature_summary
If enabled and only one package type is selected, it will print the default title for the selected package type.
Diffstat (limited to 'Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake')
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake82
1 files changed, 82 insertions, 0 deletions
diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake
new file mode 100644
index 0000000..536fe72
--- /dev/null
+++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake
@@ -0,0 +1,82 @@
+include(FeatureSummary)
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+
+find_package(Foo)
+find_package(Bar)
+find_package(Baz)
+
+set_package_properties(Foo PROPERTIES TYPE RUNTIME)
+set_package_properties(Bar PROPERTIES TYPE OPTIONAL)
+set_package_properties(Baz PROPERTIES TYPE REQUIRED)
+
+feature_summary(WHAT ALL)
+
+feature_summary(WHAT RUNTIME_PACKAGES_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY)
+feature_summary(WHAT RUNTIME_PACKAGES_NOT_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY)
+feature_summary(WHAT OPTIONAL_PACKAGES_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY)
+feature_summary(WHAT OPTIONAL_PACKAGES_NOT_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY)
+feature_summary(WHAT REQUIRED_PACKAGES_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY)
+feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY)
+
+feature_summary(WHAT RUNTIME_PACKAGES_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DESCRIPTION "RUNTIME pkgs found\n")
+feature_summary(WHAT RUNTIME_PACKAGES_NOT_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DESCRIPTION "RUNTIME pkgs not found\n")
+feature_summary(WHAT OPTIONAL_PACKAGES_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DESCRIPTION "OPTIONAL pkgs found\n")
+feature_summary(WHAT OPTIONAL_PACKAGES_NOT_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DESCRIPTION "OPTIONAL pkgs not found\n")
+feature_summary(WHAT REQUIRED_PACKAGES_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DESCRIPTION "REQUIRED pkgs found\n")
+feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DESCRIPTION "REQUIRED pkgs not found\n")
+
+feature_summary(WHAT RUNTIME_PACKAGES_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DEFAULT_DESCRIPTION)
+feature_summary(WHAT RUNTIME_PACKAGES_NOT_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DEFAULT_DESCRIPTION)
+feature_summary(WHAT OPTIONAL_PACKAGES_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DEFAULT_DESCRIPTION)
+feature_summary(WHAT OPTIONAL_PACKAGES_NOT_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DEFAULT_DESCRIPTION)
+feature_summary(WHAT REQUIRED_PACKAGES_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DEFAULT_DESCRIPTION)
+feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND
+ INCLUDE_QUIET_PACKAGES
+ QUIET_ON_EMPTY
+ DEFAULT_DESCRIPTION)