mirror of
https://github.com/boostorg/mpi.git
synced 2026-01-19 04:22:10 +00:00
Make the library modular usable.
This commit is contained in:
40
build.jam
Normal file
40
build.jam
Normal file
@@ -0,0 +1,40 @@
|
||||
# Copyright René Ferdinand Rivera Morell 2024
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
import project ;
|
||||
|
||||
project /boost/mpi
|
||||
: common-requirements
|
||||
<source>/boost/assert//boost_assert
|
||||
<source>/boost/config//boost_config
|
||||
<source>/boost/core//boost_core
|
||||
<source>/boost/foreach//boost_foreach
|
||||
<source>/boost/function//boost_function
|
||||
<source>/boost/graph//boost_graph
|
||||
<source>/boost/integer//boost_integer
|
||||
<source>/boost/iterator//boost_iterator
|
||||
<source>/boost/lexical_cast//boost_lexical_cast
|
||||
<source>/boost/mpl//boost_mpl
|
||||
<source>/boost/optional//boost_optional
|
||||
<source>/boost/python//boost_python
|
||||
<source>/boost/serialization//boost_serialization
|
||||
<source>/boost/smart_ptr//boost_smart_ptr
|
||||
<source>/boost/static_assert//boost_static_assert
|
||||
<source>/boost/throw_exception//boost_throw_exception
|
||||
<source>/boost/type_traits//boost_type_traits
|
||||
<source>/boost/utility//boost_utility
|
||||
<include>include
|
||||
;
|
||||
|
||||
explicit
|
||||
[ alias boost_mpi : build//boost_mpi ]
|
||||
[ alias boost_mpi_python : build//boost_mpi_python ]
|
||||
[ alias mpi : build//mpi ]
|
||||
[ alias all : boost_mpi boost_mpi_python mpi test ]
|
||||
;
|
||||
|
||||
call-if : boost-library mpi
|
||||
: install boost_mpi boost_mpi_python mpi
|
||||
;
|
||||
@@ -15,19 +15,18 @@ import python ;
|
||||
import option ;
|
||||
import regex ;
|
||||
|
||||
#
|
||||
# The `version-suffix` rule really belongs into python.jam, and
|
||||
# should be moved there. `split-version` is only duplicated here
|
||||
# as a prerequisite. (See https://github.com/boostorg/build/pull/290)
|
||||
#
|
||||
|
||||
|
||||
mpi_python_libs = ;
|
||||
rule tag ( name : type ? : property-set )
|
||||
{
|
||||
if python-tag in [ RULENAMES $(__name__) ]
|
||||
{
|
||||
return [ $(__name__).python-tag $(name) : $(type) : $(property-set) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
if [ mpi.configured ]
|
||||
{
|
||||
|
||||
project boost/mpi
|
||||
project
|
||||
: source-location ../src
|
||||
;
|
||||
|
||||
@@ -57,7 +56,7 @@ lib boost_mpi
|
||||
text_skeleton_oarchive.cpp
|
||||
timer.cpp
|
||||
: # Requirements
|
||||
<library>../../serialization/build//boost_serialization
|
||||
<library>/boost/serialization//boost_serialization
|
||||
<library>/mpi//mpi [ mpi.extra-requirements ]
|
||||
<define>BOOST_MPI_SOURCE=1
|
||||
<link>shared:<define>BOOST_MPI_DYN_LINK=1
|
||||
@@ -65,12 +64,12 @@ lib boost_mpi
|
||||
: # Default build
|
||||
<link>shared
|
||||
: # Usage requirements
|
||||
<library>../../serialization/build//boost_serialization
|
||||
<library>/boost/serialization//boost_serialization
|
||||
<library>/mpi//mpi [ mpi.extra-requirements ]
|
||||
;
|
||||
|
||||
if [ python.configured ]
|
||||
{
|
||||
if [ python.configured ]
|
||||
{
|
||||
lib boost_mpi_python
|
||||
: # Sources
|
||||
python/serialize.cpp
|
||||
@@ -84,8 +83,8 @@ lib boost_mpi
|
||||
<link>shared:<define>BOOST_PYTHON_DYN_LINK=1
|
||||
<define>BOOST_MPI_PYTHON_SOURCE=1
|
||||
<python-debugging>on:<define>BOOST_DEBUG_PYTHON
|
||||
-<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
|
||||
<tag>@python-tag
|
||||
-<tag>@%boostcpp.tag
|
||||
<tag>@tag
|
||||
<conditional>@python.require-py
|
||||
<local-visibility>global
|
||||
|
||||
@@ -93,6 +92,7 @@ lib boost_mpi
|
||||
<link>shared
|
||||
: # Usage requirements
|
||||
<library>/mpi//mpi [ mpi.extra-requirements ]
|
||||
<library>/python//python
|
||||
;
|
||||
|
||||
python-extension mpi
|
||||
@@ -120,22 +120,25 @@ lib boost_mpi
|
||||
<link>shared <runtime-link>shared
|
||||
<python-debugging>on:<define>BOOST_DEBUG_PYTHON
|
||||
;
|
||||
|
||||
mpi_python_libs = boost_mpi_python mpi ;
|
||||
}
|
||||
}
|
||||
else if ! ( --without-mpi in [ modules.peek : ARGV ] )
|
||||
{
|
||||
message boost_mpi
|
||||
: "warning: skipping optional Message Passing Interface (MPI) library."
|
||||
: "note: to enable MPI support, add \"using mpi ;\" to user-config.jam."
|
||||
: "note: to suppress this message, pass \"--without-mpi\" to bjam."
|
||||
: "note: otherwise, you can safely ignore this message."
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
alias boost_mpi_python ;
|
||||
alias mpi ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alias boost_mpi ;
|
||||
if ! ( --without-mpi in [ modules.peek : ARGV ] )
|
||||
{
|
||||
message boost_mpi
|
||||
: "warning: skipping optional Message Passing Interface (MPI) library."
|
||||
: "note: to enable MPI support, add \"using mpi ;\" to user-config.jam."
|
||||
: "note: to suppress this message, pass \"--without-mpi\" to b2."
|
||||
: "note: otherwise, you can safely ignore this message."
|
||||
;
|
||||
}
|
||||
alias boost_mpi_python ;
|
||||
alias mpi ;
|
||||
alias boost_mpi ;
|
||||
}
|
||||
|
||||
boost-install boost_mpi $(mpi_python_libs) ;
|
||||
|
||||
@@ -9,9 +9,15 @@
|
||||
# Authors: Douglas Gregor
|
||||
# Andrew Lumsdaine
|
||||
|
||||
project : requirements <library>/boost//mpi ;
|
||||
import mpi : mpi-test ;
|
||||
|
||||
project : requirements
|
||||
<source>/boost/test//boost_test
|
||||
<source>/boost/mpi//boost_mpi
|
||||
<source>/boost/mpi//boost_mpi_python
|
||||
<mpi.run-flags>--oversubscribe
|
||||
;
|
||||
|
||||
if [ mpi.configured ]
|
||||
{
|
||||
test-suite mpi
|
||||
|
||||
Reference in New Issue
Block a user