[CMake] Don't export symbols but the one I want

Pau Garcia i Quiles pgquiles at elpauer.org
Wed Nov 23 11:55:16 EST 2011


Hi,

gcc supports symbol visibility also. Check http://gcc.gnu.org/wiki/Visibility


On Wed, Nov 23, 2011 at 5:52 PM, David Demelier
<demelier.david at gmail.com> wrote:
> Hello,
>
> I'm creating a library that use a lot of internal code (not static because
> it should be visible by other compilation units) so I would like to don't
> export any symbols but only the one I want.
>
> Usually you use __declspec(dllexport) for windows but on unix and gcc
> everything is exported and I don't know any portable way to disable this.
>
> Does CMake can handle this problem and export some symbols without using ten
> thousand of #ifdef #endif in C files?


-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)


More information about the CMake mailing list