hidden visibility

Alexander Neundorf neundorf at kde.org
Tue Feb 21 17:31:47 UTC 2012

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
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.

So yes, this should be in GenerateExportHeader in cmake.
Probably it should be not hard, since when I looked the code was already 
structured in some way, so probably there is already a variable which holds 
the flag, when is then applied.
This would just have to be made public and documented.


More information about the Kde-buildsystem mailing list