[vtk-developers] vtkCommonCorePython static build failure
Bill Hoffman
bill.hoffman at kitware.com
Fri Jun 29 09:39:08 EDT 2012
On 6/28/2012 11:09 AM, David Gobbi wrote:
> Hi Pat,
>
> I think that "must" is too strong a word. With VTK 4, I used to build
> python modules with a static VTK on a regular basis. It can be done
> by adding "-fPIC" and by making the python modules dynamically link to
> each other, i.e. by making the python modules play a dual role as both
> modules and libraries. But I don't have any need to do that anymore
> so I haven't played around with the CMake files to see if I can get it
> working again.
>
A new feature was added to CMake to make this easier. There is a
property that can be set that will add -fPIC or whatever flag the
compiler uses for that to the static builds:
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
It is in 2.8.9. (which is in RC right now).
-Bill
More information about the vtk-developers
mailing list