summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2015-02-22 20:06:27 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-23 16:39:17 (GMT)
commit38ef2b7363533746cfc14dbc55d696de3cc75386 (patch)
tree2f727fd38ed731fe64eedc8964f3b46fb1ec6a98 /Tests
parentcb16c7844dce627ab40f404c6ac49db3cde7b0c0 (diff)
downloadCMake-38ef2b7363533746cfc14dbc55d696de3cc75386.zip
CMake-38ef2b7363533746cfc14dbc55d696de3cc75386.tar.gz
CMake-38ef2b7363533746cfc14dbc55d696de3cc75386.tar.bz2
FeatureSummary: Print each feature info only once
If a feature is added multiple times via ADD_FEATURE_INFO it should appear only once in FEATURE_SUMMARY. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt4
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake8
-rw-r--r--Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake1
3 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt
new file mode 100644
index 0000000..39be105
--- /dev/null
+++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt
@@ -0,0 +1,4 @@
+--( )
+ \* Foo , Foo decscription\.
++
+--
diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake
new file mode 100644
index 0000000..545fb92
--- /dev/null
+++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake
@@ -0,0 +1,8 @@
+include(FeatureSummary)
+
+set(WITH_FOO 1)
+
+add_feature_info(Foo WITH_FOO "Foo decscription.")
+add_feature_info(Foo WITH_FOO "Foo decscription.")
+
+feature_summary(WHAT ENABLED_FEATURES)
diff --git a/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake b/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake
index 1417338..6a5fc28 100644
--- a/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake
@@ -6,3 +6,4 @@ run_cmake(FeatureSummaryWhatSingleUnknown)
run_cmake(FeatureSummaryWhatList)
run_cmake(FeatureSummaryWhatListUnknown)
run_cmake(FeatureSummaryWhatListAll)
+run_cmake(FeatureSummaryWhatOnce)