hidden visibility

Alexander Neundorf neundorf at kde.org
Wed Feb 22 18:28:04 UTC 2012


On Tuesday 21 February 2012, Stephen Kelly wrote:
> 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.

Cool :-)
 
> 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.

But in combination with all the other flags set in KDECompilerSettings.cmake 
it would be a KDE thing.

Alex


More information about the Kde-buildsystem mailing list