summaryrefslogtreecommitdiffstats
path: root/Modules/FeatureSummary.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-10-14 22:13:49 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2009-10-14 22:13:49 (GMT)
commitb143c335fd8d0bad58080b31b6be995c43d5ff6a (patch)
tree3d21b9f304ad967709e09d01d2e6dc5ec51c52f6 /Modules/FeatureSummary.cmake
parente3dec97333008a968ea72d8ad17278ae99c9473a (diff)
downloadCMake-b143c335fd8d0bad58080b31b6be995c43d5ff6a.zip
CMake-b143c335fd8d0bad58080b31b6be995c43d5ff6a.tar.gz
CMake-b143c335fd8d0bad58080b31b6be995c43d5ff6a.tar.bz2
make it more robust wrt. #9621
although #9621 did not happen anymore with cmake 2.8.0, probably because GET_PROPERTY(... GLOBAL ...) now makes the result variable empty instead of simply not touching it, using FUNCTION() instead of MACRO() makes sure that the _EnabledFeatures variables is always empty before the GET_PROPERTY() call (and does not still have the old value from the previous call) Alex
Diffstat (limited to 'Modules/FeatureSummary.cmake')
-rw-r--r--Modules/FeatureSummary.cmake16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index 5373852..d1d31bc 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -32,7 +32,7 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(SET_FEATURE_INFO _name _desc)
+FUNCTION(SET_FEATURE_INFO _name _desc)
SET(_url "${ARGV2}")
SET(_comment "${ARGV3}")
SET_PROPERTY(GLOBAL PROPERTY ${_name}_DESCRIPTION "${_desc}" )
@@ -42,10 +42,10 @@ MACRO(SET_FEATURE_INFO _name _desc)
IF(_comment MATCHES ".+")
SET_PROPERTY(GLOBAL PROPERTY ${_name}_COMMENT "${_comment}" )
ENDIF(_comment MATCHES ".+")
-ENDMACRO(SET_FEATURE_INFO)
+ENDFUNCTION(SET_FEATURE_INFO)
-MACRO(_PRINT_FEATURES _property _text)
+FUNCTION(_PRINT_FEATURES _property _text)
SET(_currentFeatureText "${_text}")
GET_PROPERTY(_EnabledFeatures GLOBAL PROPERTY ${_property})
FOREACH(_currentFeature ${_EnabledFeatures})
@@ -64,15 +64,15 @@ MACRO(_PRINT_FEATURES _property _text)
ENDIF(_info)
ENDFOREACH(_currentFeature)
MESSAGE(STATUS "${_currentFeatureText}\n")
-ENDMACRO(_PRINT_FEATURES)
+ENDFUNCTION(_PRINT_FEATURES)
-MACRO(PRINT_ENABLED_FEATURES)
+FUNCTION(PRINT_ENABLED_FEATURES)
_PRINT_FEATURES( ENABLED_FEATURES "Enabled features:")
-ENDMACRO(PRINT_ENABLED_FEATURES)
+ENDFUNCTION(PRINT_ENABLED_FEATURES)
-MACRO(PRINT_DISABLED_FEATURES)
+FUNCTION(PRINT_DISABLED_FEATURES)
_PRINT_FEATURES( DISABLED_FEATURES "Disabled features:")
-ENDMACRO(PRINT_DISABLED_FEATURES)
+ENDFUNCTION(PRINT_DISABLED_FEATURES)