summaryrefslogtreecommitdiff
path: root/Modules/FeatureSummary.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <ddomenichelli@drdanz.it>2017-01-20 18:59:17 +0100
committerDaniele E. Domenichelli <ddomenichelli@drdanz.it>2017-01-26 10:50:08 +0100
commit4da3cae9ffb3202d9c447e9f497f8a2758538b06 (patch)
tree1f4a350ba1865fe23b205cfe3c43dcaa8ebab02e /Modules/FeatureSummary.cmake
parenta007f15344007a6261209a409c6988b0e4c4b7e0 (diff)
downloadcmake-4da3cae9ffb3202d9c447e9f497f8a2758538b06.tar.gz
FeatureSummary: Clean printed output
* Remove space before commas * Do not add an empty line before the first type of packages Also fix a typo in unit test.
Diffstat (limited to 'Modules/FeatureSummary.cmake')
-rw-r--r--Modules/FeatureSummary.cmake15
1 files changed, 9 insertions, 6 deletions
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 78d9df3dd1..93da02143e 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -14,12 +14,12 @@ packages and/or feature for a build tree such as::
LibXml2 (required version >= 2.4), XML processing lib, <http://xmlsoft.org>
* Enables HTML-import in MyWordProcessor
* Enables odt-export in MyWordProcessor
- PNG , A PNG image library. , <http://www.libpng.org/pub/png/>
+ PNG, A PNG image library., <http://www.libpng.org/pub/png/>
* Enables saving screenshots
-- The following OPTIONAL packages have not been found:
- Lua51 , The Lua scripting language. , <http://www.lua.org>
+ Lua51, The Lua scripting language., <http://www.lua.org>
* Enables macros in MyWordProcessor
- Foo , Foo provides cool stuff.
+ Foo, Foo provides cool stuff.
Functions
^^^^^^^^^
@@ -87,11 +87,11 @@ function(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
endif()
get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_DESCRIPTION)
if(_info)
- string(APPEND _currentFeatureText " , ${_info}")
+ string(APPEND _currentFeatureText ", ${_info}")
endif()
get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_URL)
if(_info)
- string(APPEND _currentFeatureText " , <${_info}>")
+ string(APPEND _currentFeatureText ", <${_info}>")
endif()
get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_PURPOSE)
@@ -287,7 +287,10 @@ function(FEATURE_SUMMARY)
set(_tmp)
_FS_GET_FEATURE_SUMMARY( ${part} _tmp ${_FS_INCLUDE_QUIET_PACKAGES})
if(_tmp)
- string(APPEND _fullText "\n-- ${title_${part}}\n${_tmp}\n")
+ if(_fullText)
+ string(APPEND _fullText "\n-- ")
+ endif()
+ string(APPEND _fullText "${title_${part}}\n${_tmp}\n")
if("${part}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND")
set(requiredPackagesNotFound TRUE)
endif()