Re: [CMake] Use of -fPIC when linking executables

2006-03-14 Thread Brad King
Lars Nordlund wrote: This simple CMakeLists.txt will (on NetBSD at least) cause the binary 'bar' to be linked with -fPIC. Is this really necessary? I know that it must be used when producing the shared object 'foo', but I did not know it was needed for the executable also? I have checked the

Re: [CMake] Use of -fPIC when linking executables

2006-03-14 Thread Lars Nordlund
On Tue, 14 Mar 2006 09:05:07 -0500 Brad King [EMAIL PROTECTED] wrote: If any of the libraries to which the executable links are shared then -fPIC must be used in the link. It isn't absolutely necessary on all platforms but the same code generates the rules for other platforms too. Is it