summaryrefslogtreecommitdiffstats
path: root/Modules/FeatureSummary.cmake
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2011-07-17 18:47:11 (GMT)
committerAlex Neundorf <neundorf@kde.org>2011-07-17 18:47:11 (GMT)
commitf366cf8a86a1e403b5922bb5bfa2488460f49201 (patch)
tree46af03ced6f38a08575cdebc0c1e54fa4a451c08 /Modules/FeatureSummary.cmake
parentf407bb5da29b36ca4edee93ff21ae2a5b8fda960 (diff)
downloadCMake-f366cf8a86a1e403b5922bb5bfa2488460f49201.zip
CMake-f366cf8a86a1e403b5922bb5bfa2488460f49201.tar.gz
CMake-f366cf8a86a1e403b5922bb5bfa2488460f49201.tar.bz2
FeatureSummary.cmake: cosmetics
-move the compat function to the bottom of the file -make all except one endif() empty Alex
Diffstat (limited to 'Modules/FeatureSummary.cmake')
-rw-r--r--Modules/FeatureSummary.cmake73
1 files changed, 39 insertions, 34 deletions
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 866b300..2419633 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -128,24 +128,6 @@ FUNCTION(ADD_FEATURE_INFO _name _enabled _desc)
ENDFUNCTION(ADD_FEATURE_INFO)
-FUNCTION(SET_FEATURE_INFO)
- SET_PACKAGE_INFO(${ARGN})
-ENDFUNCTION(SET_FEATURE_INFO)
-
-
-FUNCTION(SET_PACKAGE_INFO _name _desc)
- SET(_url "${ARGV2}")
- SET(_purpose "${ARGV3}")
- SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
- IF(_url MATCHES ".+")
- SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_url}" )
- ENDIF()
- IF(_purpose MATCHES ".+")
- SET_PROPERTY(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_purpose}" )
- ENDIF()
-ENDFUNCTION(SET_PACKAGE_INFO)
-
-
FUNCTION(SET_PACKAGE_PROPERTIES _name _props)
IF(NOT "${_props}" STREQUAL "PROPERTIES")
@@ -285,16 +267,6 @@ FUNCTION(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
ENDFUNCTION(_FS_GET_FEATURE_SUMMARY)
-FUNCTION(PRINT_ENABLED_FEATURES)
- FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
-ENDFUNCTION(PRINT_ENABLED_FEATURES)
-
-
-FUNCTION(PRINT_DISABLED_FEATURES)
- FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
-ENDFUNCTION(PRINT_DISABLED_FEATURES)
-
-
FUNCTION(FEATURE_SUMMARY)
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
@@ -306,11 +278,11 @@ FUNCTION(FEATURE_SUMMARY)
IF(_FS_UNPARSED_ARGUMENTS)
MESSAGE(FATAL_ERROR "Unknown keywords given to FEATURE_SUMMARY(): \"${_FS_UNPARSED_ARGUMENTS}\"")
- ENDIF(_FS_UNPARSED_ARGUMENTS)
+ ENDIF()
IF(NOT _FS_WHAT)
MESSAGE(FATAL_ERROR "The call to FEATURE_SUMMAY() doesn't set the required WHAT argument.")
- ENDIF(NOT _FS_WHAT)
+ ENDIF()
SET(validWhatParts "ENABLED_FEATURES"
"DISABLED_FEATURES"
@@ -379,20 +351,53 @@ FUNCTION(FEATURE_SUMMARY)
FILE(APPEND "${_FS_FILENAME}" "${_fullText}")
ELSE(_FS_APPEND)
FILE(WRITE "${_FS_FILENAME}" "${_fullText}")
- ENDIF(_FS_APPEND)
+ ENDIF()
ELSE(_FS_FILENAME)
IF(NOT _FS_VAR)
MESSAGE(STATUS "${_fullText}")
- ENDIF(NOT _FS_VAR)
- ENDIF(_FS_FILENAME)
+ ENDIF()
+ ENDIF()
IF(_FS_VAR)
SET(${_FS_VAR} "${_fullText}" PARENT_SCOPE)
- ENDIF(_FS_VAR)
+ ENDIF()
IF(requiredPackagesNotFound AND _FS_FATAL_ON_MISSING_REQUIRED_PACKAGES)
MESSAGE(FATAL_ERROR "feature_summary() Error: REQUIRED package(s) are missing, aborting CMake run.")
ENDIF()
ENDFUNCTION(FEATURE_SUMMARY)
+
+
+# The stuff below is only kept for compatibility
+
+FUNCTION(SET_PACKAGE_INFO _name _desc)
+ SET(_url "${ARGV2}")
+ SET(_purpose "${ARGV3}")
+ SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
+ IF(_url MATCHES ".+")
+ SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_url}" )
+ ENDIF()
+ IF(_purpose MATCHES ".+")
+ SET_PROPERTY(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_purpose}" )
+ ENDIF()
+ENDFUNCTION(SET_PACKAGE_INFO)
+
+
+
+FUNCTION(SET_FEATURE_INFO)
+ SET_PACKAGE_INFO(${ARGN})
+ENDFUNCTION(SET_FEATURE_INFO)
+
+
+
+FUNCTION(PRINT_ENABLED_FEATURES)
+ FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
+ENDFUNCTION(PRINT_ENABLED_FEATURES)
+
+
+
+FUNCTION(PRINT_DISABLED_FEATURES)
+ FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
+ENDFUNCTION(PRINT_DISABLED_FEATURES)