[CMake] -fPIC with executables

James Bigler jamesbigler at gmail.com
Tue Oct 27 14:59:13 EDT 2009


On Tue, Oct 27, 2009 at 12:43 PM, Brad King <brad.king at kitware.com> wrote:

> James Bigler wrote:
> > I noticed in some commit message to CMake a while ago that -fPIC was
> > removed from executable compilation.
> >
> > Would anyone care to comment on why this is?  I must admit I thought it
> > wouldn't hurt it to have it compiled with that flag.
>
> It's unnecessary, and is actually a Debian policy violation.
> See here:
>
>  http://www.cmake.org/Bug/view.php?id=9659
>
> -Brad
>

Thanks for the info.  That means I'll have to update my FindCUDA.cmake
script to be smarter about adding that flag, since it does so whenever
BUILD_SHARED_LIBS is true, even when compiling an executable.

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091027/4d94728b/attachment.htm>


More information about the CMake mailing list