[cmake-developers] VISIBILITY_DEFAULT target property

Stephen Kelly steveire at gmail.com
Thu May 23 06:58:12 EDT 2013


I pushed a PRESET_VISIBILITY-property to my clone.

Stephen Kelly wrote:
>> Thanks for the explanation.  (I assume you meant
>> s/DEFAULT_VISIBILITY/VISIBILITY_DEFAULT/ in your example.)
> 
> Yes. I've been backward and forward over what to call that property while
> implementing it.

I settled on PRESET_VISIBILITY because it does not have the word default in 
it, which avoids. I don't want to bikeshed the name, so if you chose 
something you'd prefer, I don't mind changing it.

>> In my understanding of your proposal, VISIBILITY_DEFAULT == "hidden"
>> will add -fvisibility=hidden *and* -fvisibility-inlines-hidden.
>> Should we have a way to skip the latter e.g. "hidden-no-inlines"?
> 
> Perhaps. If we can figure out how to name everything.

I decided to use a separate option. Adding 

 set(CMAKE_CXX_NO_INLINE_EXPORT 1)

is not a large cost.

Thanks,

Steve.




More information about the cmake-developers mailing list