hidden visibility

Stephen Kelly steveire at gmail.com
Tue Feb 21 22:59:49 UTC 2012


Alexander Neundorf wrote:

> On Tuesday 21 February 2012, Stephen Kelly wrote:
>> Alexander Neundorf wrote:
>> > It would be nice if we could get rid of this code, and use what is in
>> > GenerateExportHeader.cmake instead.
>> 
>> I'm a bit confused about why we can't use GenerateExportHeader as it is.
>> 
>> In fact, we do already use GenerateExportHeader as it is.
>> 
>> In what way does it need to be extended, and why shouldn't that extension
>> go into CMake instead?
> 
> Maybe we misunderstood.
> 
> Right now we do use GenerateExportHeader directly in e-c-m as it is.
> This is possible because we decided that
> include(KDECompilerSettings)
> will set the compiler flags, and not just provide a set of variables which
> hold flags which can then be used (which is the recommended way for find-
> modules and config files).
> 
> If we would have decided that KDECompilerSettings.cmake should only set a
> KDE_CXX_FLAGS variable, we would need a way to include()
> GenerateExportHeader and get the flags from it, without applying them
> immediately.

That's already available actually, but misdocumented. I've just pushed a 
branch fixing the documentation to next.

What you want is this:

add_compiler_export_flags(_export_flags)

set(KDE_CXX_FLAGS "${KDE_CXX_FLAGS} ${_export_flags")

However, I'm not convinced you *should* want that.

This flag is not coming from CMake, but from KDE. 


Thanks,

Steve.




More information about the Kde-buildsystem mailing list