mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 20:49:41 +00:00
FeatureSummary.cmake: cosmetics
-move the compat function to the bottom of the file -make all except one endif() empty Alex
This commit is contained in:
parent
f407bb5da2
commit
f366cf8a86
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user