<br><br><div class="gmail_quote">On Wed, Aug 15, 2012 at 4:11 PM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Aug 15, 2012 at 2:49 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
> I'm wondering if someone can provide insight into this compiler<br>
> warning that I'm seeing:<br>
><br>
> cc1: warning: command line option "-fvisibility-inlines-hidden" is<br>
> valid for C++/ObjC++ but not for C<br>
><br>
> I'm building a module library with vtk_module_library(), where the<br>
> source files are all in C (no C++). It seems that the flags<br>
> "-fvisibility=hidden -fvisibility-inlines-hidden" are automatically<br>
> being added by a cmake macro somewhere.<br>
><br>
> This is with VTK master and cmake 2.8.9, with gcc 4.2 on linux.<br>
><br>
</div>I think we are doing this for all VTK libraries that are built shared,<br>
and I didn't account for C only libraries. Is there a good way to tell<br>
if a target is a C only library from the CMake level for things like<br>
this?<br>
<span class="HOEnZb"><font color="#888888"><br>
Marcus<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br><div><br></div><div>The LINKER_LANGUAGE target property:</div><div><br></div><div> <a href="http://cmake.org/cmake/help/v2.8.9/cmake.html#prop_tgt:LINKER_LANGUAGE">http://cmake.org/cmake/help/v2.8.9/cmake.html#prop_tgt:LINKER_LANGUAGE</a></div>
<div><br></div><div>should be "C" for a C-only target.</div><div><br></div>