new cmake macro available (starting monday): MACRO_APPEND_IF()

David Faure faure at
Sun Dec 16 14:19:28 GMT 2007

On Sunday 16 December 2007, Alexander Neundorf wrote:
> Hi,
> I added a new macro MACRO_APPEND_IF(var condition value1..valueN) to kdelibs.
> Typical use is like this, instead of:
>   set(mySrcs ${mySrcs} file1.cpp file2.cpp)
> you can now do:
> macro_append_if(mySrcs SOMETHING_FOUND file1.cpp file2.cpp)

Is this really worth it? The if/set/endif lines are clear and human-readable, while
macro_append_if sounds like "there's some magic involved here, including some
condition and some appending" but without being as clear for the casual reader, IMHO.
Not a strong veto, just wondering...

David Faure, faure at, sponsored by Trolltech to work on KDE,
Konqueror (, and KOffice (

More information about the kde-core-devel mailing list