diff options
author | Brad King <brad.king@kitware.com> | 2010-09-28 18:02:19 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-09-28 18:02:19 (GMT) |
commit | c0665ca79572215a6f00804ec5c75f598682d465 (patch) | |
tree | 70b4c6001299a5d5a3a56bf4b431908331fda775 | |
parent | 5efe30791b7c72114bc53c145e41a729de7edcf9 (diff) | |
parent | b935f00fdf0ad30102ba4eca05f720e977fa59da (diff) | |
download | CMake-c0665ca79572215a6f00804ec5c75f598682d465.zip CMake-c0665ca79572215a6f00804ec5c75f598682d465.tar.gz CMake-c0665ca79572215a6f00804ec5c75f598682d465.tar.bz2 |
Merge topic 'DescriptionsForFeatureSummaryALL'
b935f00 Close ENDFUNCTION() properly with the same name as FUNCTION()
07bca48 Set a default DESCRIPTION if none is given for ALL mode of feature_summary()
d5b2915 APPEND and not-APPEND mode of feature_summary() were swapped
-rw-r--r-- | Modules/FeatureSummary.cmake | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 594e2e7..f7bfe27 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -120,7 +120,7 @@ FUNCTION(ADD_FEATURE_INFO _name _enabled _desc) ENDIF () SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" ) -ENDFUNCTION(SET_FEATURE_INFO) +ENDFUNCTION(ADD_FEATURE_INFO) FUNCTION(SET_FEATURE_INFO) @@ -199,21 +199,25 @@ 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(WRITE "${_FS_FILENAME}" "${_fullText}") - ELSE(_FS_APPEND) FILE(APPEND "${_FS_FILENAME}" "${_fullText}") + ELSE(_FS_APPEND) + FILE(WRITE "${_FS_FILENAME}" "${_fullText}") ENDIF(_FS_APPEND) ELSE(_FS_FILENAME) |