CMake and ksysguardd

Pau Garcia i Quiles pgquiles at elpauer.org
Wed Sep 30 21:35:39 BST 2009


On Wed, Sep 30, 2009 at 9:52 PM, Alexander Neundorf <neundorf at kde.org> wrote:
[...]
> ######### copy the contents of the three macros here:
>
> macro(MACRO_BOOL_TO_01 ...)
> ...
> endmacro(...)
> ...
[...]

Thread-jacking but still: would it be possible to add stuff like
MacroOptionalFindPackage, MacroBoolTo01, MacroLogFeature,
MacroEnsureVersion, MacroEnsureOutOfSourceBuild, etc to CMake 2.8 ?

For instance:

* MacroOptionalFindPackage -> FIND_PACKAGE( blah OPTIONAL )

* MacroEnsureOutOfSourceBuild -> PROJECT( myproj OUTOFSOURCE )

* MacroBoolTo01 -> Just bundle it with CMake 2.8 and rename it to
BOOL_TO_01. I would have loved something like SET( 01 VAR RESULT0 ...
RESULTN ) but I guess it's a major change in SET behavior

* MacroLogFeature -> MESSAGE( LOG VAR FEATURE DESCRIPTION URL
[REQUIRED [MIN_VERSION [COMMENTS]]] ) (same parameters
MACRO_LOG_FEATURE has)

* MacroAppendIf -> LIST( APPEND_IF ... )

* MacroOptionalAddSubdirectory -> ADD_SUBDIRECTORY ( dir OPTIONAL )

* MacroPushRequiredVars -> Add CMAKE_REQUIRED_XXX parameters to the
macros that use them instead of defining CMAKE_REQUIRED_XXX globally,
then this whole push/pop issue is gone. For instance, change the
signature of CHECK_FUNCTION_EXISTS from CHECK_FUNCTION_EXISTS(FUNCTION
VARIABLE) to
                CHECK_FUNCTION_EXISTS( function variable
                                              [ CMAKE_REQUIRED_FLAGS crf ]
                                              [ CMAKE_REQUIRED_DEFINITIONS crd ]
                                              [ CMAKE_REQUIRED_INCLUDES cri ]
                                              [ CMAKE_REQUIRED_LIBRARIES crl ]
                                            )

etc

I know it's probably a bit late in CMake's development cycle to do all
these changes (RC1!) but I had no idea 2.8 was coming so early :-(

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)



More information about the kde-core-devel mailing list