summaryrefslogtreecommitdiffstats
path: root/Modules/FeatureSummary.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <ddomenichelli@drdanz.it>2017-02-03 14:42:11 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-06 19:44:24 (GMT)
commit6f62c66b2c5f0595ff0a51ca97f3b5e1d0924523 (patch)
tree6deee3a8e893623fdf867434d880d1431781fde3 /Modules/FeatureSummary.cmake
parentf9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7 (diff)
downloadCMake-6f62c66b2c5f0595ff0a51ca97f3b5e1d0924523.zip
CMake-6f62c66b2c5f0595ff0a51ca97f3b5e1d0924523.tar.gz
CMake-6f62c66b2c5f0595ff0a51ca97f3b5e1d0924523.tar.bz2
FeatureSummary: Add FeatureSummary_<TYPE>_DESCRIPTION global properties
The global property FeatureSummary_<TYPE>_DESCRIPTION can be defined for each type to replace the type name with the specified string whenever the package type is used in an output string.
Diffstat (limited to 'Modules/FeatureSummary.cmake')
-rw-r--r--Modules/FeatureSummary.cmake19
1 files changed, 17 insertions, 2 deletions
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 2913753..1b93304 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -63,6 +63,16 @@ is set for all the packages.
The default value for this global property is ``OPTIONAL``.
+
+.. variable:: FeatureSummary_<TYPE>_DESCRIPTION
+
+The global property :variable:`FeatureSummary_<TYPE>_DESCRIPTION` can be defined
+for each type to replace the type name with the specified string whenever the
+package type is used in an output string.
+
+If not set, the string "``<TYPE>`` packages" is used.
+
+
#]=======================================================================]
get_property(_fsPkgTypeIsSet GLOBAL PROPERTY FeatureSummary_PKG_TYPES SET)
@@ -351,8 +361,13 @@ function(FEATURE_SUMMARY)
set(title_PACKAGES_FOUND "The following packages have been found:")
set(title_PACKAGES_NOT_FOUND "The following packages have not been found:")
foreach(_fsPkgType ${_fsPkgTypes})
- set(title_${_fsPkgType}_PACKAGES_FOUND "The following ${_fsPkgType} packages have been found:")
- set(title_${_fsPkgType}_PACKAGES_NOT_FOUND "The following ${_fsPkgType} packages have not been found:")
+ set(_fsPkgTypeDescription "${_fsPkgType} packages")
+ get_property(_fsPkgTypeDescriptionIsSet GLOBAL PROPERTY FeatureSummary_${_fsPkgType}_DESCRIPTION SET)
+ if(_fsPkgTypeDescriptionIsSet)
+ get_property(_fsPkgTypeDescription GLOBAL PROPERTY FeatureSummary_${_fsPkgType}_DESCRIPTION )
+ endif()
+ set(title_${_fsPkgType}_PACKAGES_FOUND "The following ${_fsPkgTypeDescription} have been found:")
+ set(title_${_fsPkgType}_PACKAGES_NOT_FOUND "The following ${_fsPkgTypeDescription} have not been found:")
endforeach()
list(FIND validWhatParts "${_FS_WHAT}" indexInList)