[Cmake-commits] [cmake-commits] alex committed FeatureSummary.cmake 1.5 1.6

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Oct 14 18:13:53 EDT 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv15956

Modified Files:
	FeatureSummary.cmake 
Log Message:
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


Index: FeatureSummary.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FeatureSummary.cmake,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** FeatureSummary.cmake	28 Sep 2009 15:46:50 -0000	1.5
--- FeatureSummary.cmake	14 Oct 2009 22:13:49 -0000	1.6
***************
*** 33,37 ****
  #  License text for the above reference.)
  
! MACRO(SET_FEATURE_INFO _name _desc)
    SET(_url "${ARGV2}")
    SET(_comment "${ARGV3}")
--- 33,37 ----
  #  License text for the above reference.)
  
! FUNCTION(SET_FEATURE_INFO _name _desc)
    SET(_url "${ARGV2}")
    SET(_comment "${ARGV3}")
***************
*** 43,50 ****
      SET_PROPERTY(GLOBAL PROPERTY ${_name}_COMMENT "${_comment}" )
    ENDIF(_comment MATCHES ".+")
! ENDMACRO(SET_FEATURE_INFO)
  
  
! MACRO(_PRINT_FEATURES _property _text)
    SET(_currentFeatureText "${_text}")
    GET_PROPERTY(_EnabledFeatures  GLOBAL PROPERTY ${_property})
--- 43,50 ----
      SET_PROPERTY(GLOBAL PROPERTY ${_name}_COMMENT "${_comment}" )
    ENDIF(_comment MATCHES ".+")
! ENDFUNCTION(SET_FEATURE_INFO)
  
  
! FUNCTION(_PRINT_FEATURES _property _text)
    SET(_currentFeatureText "${_text}")
    GET_PROPERTY(_EnabledFeatures  GLOBAL PROPERTY ${_property})
***************
*** 65,78 ****
    ENDFOREACH(_currentFeature)
    MESSAGE(STATUS "${_currentFeatureText}\n")
! ENDMACRO(_PRINT_FEATURES)
  
  
! MACRO(PRINT_ENABLED_FEATURES)
     _PRINT_FEATURES( ENABLED_FEATURES "Enabled features:")
! ENDMACRO(PRINT_ENABLED_FEATURES)
  
  
! MACRO(PRINT_DISABLED_FEATURES)
     _PRINT_FEATURES( DISABLED_FEATURES "Disabled features:")
! ENDMACRO(PRINT_DISABLED_FEATURES)
  
--- 65,78 ----
    ENDFOREACH(_currentFeature)
    MESSAGE(STATUS "${_currentFeatureText}\n")
! ENDFUNCTION(_PRINT_FEATURES)
  
  
! FUNCTION(PRINT_ENABLED_FEATURES)
     _PRINT_FEATURES( ENABLED_FEATURES "Enabled features:")
! ENDFUNCTION(PRINT_ENABLED_FEATURES)
  
  
! FUNCTION(PRINT_DISABLED_FEATURES)
     _PRINT_FEATURES( DISABLED_FEATURES "Disabled features:")
! ENDFUNCTION(PRINT_DISABLED_FEATURES)
  



More information about the Cmake-commits mailing list