1# Copyright (C) 2005, 2006 The Trustees of Indiana University. 2# Copyright (C) 2005 Douglas Gregor <doug.gregor -at- gmail.com> 3# Copyright (c) 2018 Stefan Seefeld 4 5# Use, modification and distribution is subject to the Boost Software 6# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7# http://www.boost.org/LICENSE_1_0.txt) 8 9# Authors: Douglas Gregor 10# Andrew Lumsdaine 11 12import mpi ; 13import indirect ; 14import python ; 15import option ; 16import regex ; 17 18# 19# The `version-suffix` rule really belongs into python.jam, and 20# should be moved there. `split-version` is only duplicated here 21# as a prerequisite. (See https://github.com/boostorg/build/pull/290) 22# 23 24 25mpi_python_libs = ; 26 27if [ mpi.configured ] 28{ 29 30project boost/mpi 31 : source-location ../src 32 ; 33 34lib boost_mpi 35 : 36 broadcast.cpp 37 cartesian_communicator.cpp 38 communicator.cpp 39 computation_tree.cpp 40 content_oarchive.cpp 41 environment.cpp 42 error_string.cpp 43 exception.cpp 44 graph_communicator.cpp 45 group.cpp 46 intercommunicator.cpp 47 mpi_datatype_cache.cpp 48 mpi_datatype_oarchive.cpp 49 offsets.cpp 50 packed_iarchive.cpp 51 packed_oarchive.cpp 52 packed_skeleton_iarchive.cpp 53 packed_skeleton_oarchive.cpp 54 point_to_point.cpp 55 request.cpp 56 status.cpp 57 text_skeleton_oarchive.cpp 58 timer.cpp 59 : # Requirements 60 <library>../../serialization/build//boost_serialization 61 <library>/mpi//mpi [ mpi.extra-requirements ] 62 <define>BOOST_MPI_SOURCE=1 63 <link>shared:<define>BOOST_MPI_DYN_LINK=1 64 <local-visibility>global 65 : # Default build 66 <link>shared 67 : # Usage requirements 68 <library>../../serialization/build//boost_serialization 69 <library>/mpi//mpi [ mpi.extra-requirements ] 70 ; 71 72 if [ python.configured ] 73 { 74 lib boost_mpi_python 75 : # Sources 76 python/serialize.cpp 77 : # Requirements 78 <library>boost_mpi 79 <library>/mpi//mpi [ mpi.extra-requirements ] 80 <library>/boost/python//boost_python 81 <link>shared:<define>BOOST_MPI_DYN_LINK=1 82 <link>shared:<define>BOOST_MPI_PYTHON_DYN_LINK=1 83 <link>shared:<define>BOOST_PYTHON_DYN_LINK=1 84 <define>BOOST_MPI_PYTHON_SOURCE=1 85 <python-debugging>on:<define>BOOST_DEBUG_PYTHON 86 -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag 87 <tag>@python-tag 88 <conditional>@python.require-py 89 <local-visibility>global 90 91 : # Default build 92 <link>shared 93 : # Usage requirements 94 <library>/mpi//mpi [ mpi.extra-requirements ] 95 ; 96 97 python-extension mpi 98 : # Sources 99 python/collectives.cpp 100 python/py_communicator.cpp 101 python/datatypes.cpp 102 python/documentation.cpp 103 python/py_environment.cpp 104 python/py_nonblocking.cpp 105 python/py_exception.cpp 106 python/module.cpp 107 python/py_request.cpp 108 python/skeleton_and_content.cpp 109 python/status.cpp 110 python/py_timer.cpp 111 : # Requirements 112 <library>/boost/python//boost_python 113 <library>boost_mpi_python 114 <library>boost_mpi 115 <library>/mpi//mpi [ mpi.extra-requirements ] 116 <link>shared:<define>BOOST_MPI_DYN_LINK=1 117 <link>shared:<define>BOOST_MPI_PYTHON_DYN_LINK=1 118 <link>shared:<define>BOOST_PYTHON_DYN_LINK=1 119 <link>shared <runtime-link>shared 120 <python-debugging>on:<define>BOOST_DEBUG_PYTHON 121 ; 122 123 mpi_python_libs = boost_mpi_python mpi ; 124 } 125} 126else if ! ( --without-mpi in [ modules.peek : ARGV ] ) 127{ 128 message boost_mpi 129 : "warning: skipping optional Message Passing Interface (MPI) library." 130 : "note: to enable MPI support, add \"using mpi ;\" to user-config.jam." 131 : "note: to suppress this message, pass \"--without-mpi\" to bjam." 132 : "note: otherwise, you can safely ignore this message." 133 ; 134} 135else 136{ 137 alias boost_mpi ; 138} 139 140boost-install boost_mpi $(mpi_python_libs) ; 141