RFC: replacing MacroLogFeature.cmake with FeatureSummary.cmake

Alexander Neundorf neundorf at kde.org
Sun Jul 17 20:31:27 BST 2011


Ok, there is now a branch FeatureSummaryImprovements on the cmake stage:
http://cmake.org/gitweb?p=stage/cmake.git;a=shortlog;h=refs/heads/FeatureSummaryImprovements

It should have everything discussed here:
* every package can have multiple PURPOSEs
* every package has a dependency TYPE: RUNTIME < OPTIONAL < RECOMMENDED < 
REQUIRED

* optionally, feature_summary() can abort if a REQUIRED package has not been 
found


Usage is like this:

find_package(LibXml2)
# the following one ideally directly inside LibXml2:
set_package_properties(LibXml2 PROPERTIES
                               DESCRIPTION "XML processing library."
                               URL "http://xmlsoft.org/")

# and in the using project
set_package_properties(LibXml2 PROPERTIES
    PURPOSE "Required for exporting spreadsheets to odt format in kspread"
    TYPE RECOMMENDED
    )


# and in some other part of the project:
set_package_properties(LibXml2 PROPERTIES
                PURPOSE "Required for importing html files in kword"
                TYPE OPTIONAL )

# or all in one call:
find_package(DBus)
set_package_properties(DBus PROPERTIES 
                DESCRIPTION "A desktop IPC bus"
                URL "http://dbus.freedesktop.org>"
                TYPE RUNTIME
                PURPOSE "Required to disable the screensaver via kpresenter")


The call to feature_summary() equivalent to what we have now is:
feature_summary(WHAT ALL   FATAL_ON_MISSING_REQUIRED_PACKAGES)


Please give it a try, let me know about issues you find or whether it's just 
nice.
Also, I'm happy about patches which improve the documentation or the output 
format (or anything else).

Alex



More information about the kde-core-devel mailing list