[Cmake-commits] CMake branch, next, updated. v3.2.0-rc1-637-g3f9d984

Brad King brad.king at kitware.com
Mon Feb 23 11:39:37 EST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  3f9d98434b29ad77aa6374410b8d3c45ead477e0 (commit)
       via  38ef2b7363533746cfc14dbc55d696de3cc75386 (commit)
      from  9b38b8d0336e88b00167f03ff152bc900a494e4f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f9d98434b29ad77aa6374410b8d3c45ead477e0
commit 3f9d98434b29ad77aa6374410b8d3c45ead477e0
Merge: 9b38b8d 38ef2b7
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 23 11:39:36 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 23 11:39:36 2015 -0500

    Merge topic 'FeatureSummary-no-duplicates' into next
    
    38ef2b73 FeatureSummary: Print each feature info only once


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38ef2b7363533746cfc14dbc55d696de3cc75386
commit 38ef2b7363533746cfc14dbc55d696de3cc75386
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Sun Feb 22 21:06:27 2015 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 23 11:39:17 2015 -0500

    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 at googlemail.com>

diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 3eea9db..ce5a4ed 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -379,6 +379,9 @@ function(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
 
   set(_currentFeatureText "")
   get_property(_EnabledFeatures  GLOBAL PROPERTY ${_property})
+  if(_EnabledFeatures)
+    list(REMOVE_DUPLICATES _EnabledFeatures)
+  endif(_EnabledFeatures)
 
   foreach(_currentFeature ${_EnabledFeatures})
 
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)

-----------------------------------------------------------------------

Summary of changes:
 Modules/FeatureSummary.cmake                                   |    3 +++
 .../RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt  |    4 ++++
 Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake     |    8 ++++++++
 Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake               |    1 +
 4 files changed, 16 insertions(+)
 create mode 100644 Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce-stdout.txt
 create mode 100644 Tests/RunCMake/FeatureSummary/FeatureSummaryWhatOnce.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list