Boost logo

Boost Interest :

Subject: Re: [Boost-cmake] 1.40.0.cmake5 (?) builds cleanly
From: Troy D. Straszheim (troy_at_[hidden])
Date: 2009-12-22 08:54:16

Denis Arnaud <denis.arnaud_boost_at_[hidden]> writes:

> 2009/12/21 Troy D. Straszheim <troy_at_[hidden]>
> AFAIK this is the only python module built by boost and nobody has given
> serious thought to where it should be installed.  This is a large can of
> wriggly worms.  /usr/lib[64]/python2.6/boost does sounds reasonable, the
> important thing is that it is on the system's PYTHONPATH.  You'd also
> need to drop an empty into that boost directory.
> So, you are right, Troy: except for MPI, only test suites build Python
> extensions.
> Following is the building directive for the MPI Python extension (in libs/mpi/
> src/CMakeLists.txt):
>   boost_python_extension(mpi
>     python/collectives.cpp
>     [...]
>     python/py_timer.cpp
>     DEPENDS boost_python boost_mpi
> So, as I understand, we should explicitly link the Python extension, not
> only with the MPI libraries, but also with the Boost.MPI ones
> ( We would have to amend the LINK_LIBS directive with
> something like:
> But I do not see any such ${BOOST_MPI_LIBRARIES} variable defined. How should
> we do it?

What problem are you trying to solve? If you make with VERBOSE=1 I
believe you will see that boost_mpi is linked already.

> The other question is: how could we set a distinct installation path for that
> Python extension?
> We could maybe define a CMAKE_PYTEXT_INSTALL_PREFIX variable for that purpose?

Yes one could. You could pass NO_INSTALL to add_single_library() and
then call cmake's install() manually on the mpi target. But it'd be
nice if this were more generally usable. Typically things are more
complicated, e.g. there is associated pure python code (say,
and some other stuff) and different modules will want to live in
different subdirectories of the system's site-packages... should one
just hand this off to python's distutils? Are there any well-behaved,
cmake-built python bindings in existence? What do they do?


Boost-cmake list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at