summaryrefslogtreecommitdiff
path: root/Modules/FeatureSummary.cmake
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2010-09-21 22:31:04 +0200
committerAlex Neundorf <neundorf@kde.org>2010-09-21 22:31:04 +0200
commit07bca488683c3382b76c7ba6f89eeb87961dc9ba (patch)
tree7d039d05aa39e2ffa757319936a6162ab73d1704 /Modules/FeatureSummary.cmake
parentd5b29155b47935c230b0f949c6fb0e0962173395 (diff)
downloadcmake-07bca488683c3382b76c7ba6f89eeb87961dc9ba.tar.gz
Set a default DESCRIPTION if none is given for ALL mode of feature_summary()
Alex
Diffstat (limited to 'Modules/FeatureSummary.cmake')
-rw-r--r--Modules/FeatureSummary.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 78788f4105..c761e7a64a 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -199,16 +199,20 @@ FUNCTION(FEATURE_SUMMARY)
OR "${_FS_WHAT}" STREQUAL "PACKAGES_FOUND"
OR "${_FS_WHAT}" STREQUAL "PACKAGES_NOT_FOUND")
_FS_GET_FEATURE_SUMMARY( ${_FS_WHAT} _featureSummary)
+ SET(_fullText "${_FS_DESCRIPTION}${_featureSummary}\n")
ELSEIF("${_FS_WHAT}" STREQUAL "ALL")
_FS_GET_FEATURE_SUMMARY( PACKAGES_FOUND _tmp1)
_FS_GET_FEATURE_SUMMARY( PACKAGES_NOT_FOUND _tmp2)
SET(_featureSummary "${_tmp1}${_tmp2}")
+ IF(_FS_DESCRIPTION)
+ SET(_fullText "${_FS_DESCRIPTION}${_tmp1}${_tmp2}\n")
+ ELSE(_FS_DESCRIPTION)
+ SET(_fullText "-- Found the following packages:${_tmp1}\n-- Did not find the following packages:${_tmp2}\n")
+ ENDIF(_FS_DESCRIPTION)
ELSE()
MESSAGE(FATAL_ERROR "The WHAT argument of FEATURE_SUMMARY() is set to ${_FS_WHAT}, which is not a valid value.")
ENDIF()
- SET(_fullText "${_FS_DESCRIPTION}${_featureSummary}\n")
-
IF(_FS_FILENAME)
IF(_FS_APPEND)
FILE(APPEND "${_FS_FILENAME}" "${_fullText}")