summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FeatureSummary/FeatureSummaryQuietOnEmpty.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <ddomenichelli@drdanz.it>2017-01-20 18:00:07 (GMT)
committerDaniele E. Domenichelli <ddomenichelli@drdanz.it>2017-01-26 09:52:35 (GMT)
commit9da7bf082513952c47ffb738b722df49a2fd7152 (patch)
tree72af8719308a97e736a8693ad65e17168d1e3c8f /Tests/RunCMake/FeatureSummary/FeatureSummaryQuietOnEmpty.cmake
parent4cf4acebe347bfd55e051354b9748a5b0c25b58a (diff)
downloadCMake-9da7bf082513952c47ffb738b722df49a2fd7152.zip
CMake-9da7bf082513952c47ffb738b722df49a2fd7152.tar.gz
CMake-9da7bf082513952c47ffb738b722df49a2fd7152.tar.bz2
FeatureSummary: Add QUIET_ON_EMPTY option to feature_summary
This option suppresses the output when the list of packages that belong to the selected category is empty.
Diffstat (limited to 'Tests/RunCMake/FeatureSummary/FeatureSummaryQuietOnEmpty.cmake')
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryQuietOnEmpty.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryQuietOnEmpty.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryQuietOnEmpty.cmake
new file mode 100644
index 0000000..8d1d007
--- /dev/null
+++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryQuietOnEmpty.cmake
@@ -0,0 +1,14 @@
+include(FeatureSummary)
+
+set(WITH_FOO 1)
+set(WITH_BAR 1)
+
+add_feature_info(Foo WITH_FOO "Foo.")
+add_feature_info(Bar WITH_BAR "Bar.")
+
+feature_summary(WHAT ENABLED_FEATURES
+ DESCRIPTION "Enabled features:"
+ QUIET_ON_EMPTY)
+feature_summary(WHAT DISABLED_FEATURES
+ DESCRIPTION "Disabled features:"
+ QUIET_ON_EMPTY)