[vtk-developers] Visibility flags and C

David Cole david.cole at kitware.com
Wed Aug 15 16:17:28 EDT 2012


On Wed, Aug 15, 2012 at 4:11 PM, Marcus D. Hanwell <
marcus.hanwell at kitware.com> wrote:

> On Wed, Aug 15, 2012 at 2:49 PM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> > I'm wondering if someone can provide insight into this compiler
> > warning that I'm seeing:
> >
> >  cc1: warning: command line option "-fvisibility-inlines-hidden" is
> >  valid for C++/ObjC++ but not for C
> >
> > I'm building a module library with vtk_module_library(), where the
> > source files are all in C (no C++).  It seems that the flags
> > "-fvisibility=hidden -fvisibility-inlines-hidden" are automatically
> > being added by a cmake macro somewhere.
> >
> > This is with VTK master and cmake 2.8.9, with gcc 4.2 on linux.
> >
> I think we are doing this for all VTK libraries that are built shared,
> and I didn't account for C only libraries. Is there a good way to tell
> if a target is a C only library from the CMake level for things like
> this?
>
> Marcus
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>

The LINKER_LANGUAGE target property:

  http://cmake.org/cmake/help/v2.8.9/cmake.html#prop_tgt:LINKER_LANGUAGE

should be "C" for a C-only target.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120815/2e15df1e/attachment.html>


More information about the vtk-developers mailing list