[vtk-developers] Visibility flags and C

David Gobbi david.gobbi at gmail.com
Wed Aug 15 16:32:55 EDT 2012


On Wed, Aug 15, 2012 at 2:11 PM, Marcus D. Hanwell
<marcus.hanwell at kitware.com> wrote:
>
> 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?

When BUILD_SHARED_LIBS is ON, then it is done for all libraries,
whether the individual libraries are built shared or not.  Not to say
that's wrong... in fact I think that it's the right way to go.  The
flags are added around line 467 in vtkModuleMacros.cmake:

if (BUILD_SHARED_LIBS)
  add_compiler_export_flags(my_abi_flags)
  ...

But the main issue is that the same flags are added for both C and
C++, even though -fvisibility-inlines-hidden is a C++-only flag.

 - David



More information about the vtk-developers mailing list