Commit 38ef2b73 authored by Gregor Jasny's avatar Gregor Jasny Committed by Brad King

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's avatarGregor Jasny <gjasny@googlemail.com>
parent cb16c784
......@@ -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})
......
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)
......@@ -6,3 +6,4 @@ run_cmake(FeatureSummaryWhatSingleUnknown)
run_cmake(FeatureSummaryWhatList)
run_cmake(FeatureSummaryWhatListUnknown)
run_cmake(FeatureSummaryWhatListAll)
run_cmake(FeatureSummaryWhatOnce)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment