1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
from devtools.yamaker import boost
from devtools.yamaker import fileutil
from devtools.yamaker.modules import GLOBAL, Linkable, Switch
from devtools.yamaker.project import NixSourceProject
def post_install(self):
self.yamakes["."] = boost.make_library(self, populate_srcs=True)
with self.yamakes["."] as graph:
# Disable parallel version which makes use of OpenMP / MPI
fileutil.re_sub_dir(
f"{self.dstdir}/include",
r"#include BOOST_GRAPH_MPI_INCLUDE\(.*\)",
"",
)
graph.after("CFLAGS", Switch({"DYNAMIC_BOOST": Linkable(CFLAGS=[GLOBAL("-DBOOST_GRAPH_DYN_LINK")])}))
boost_graph = NixSourceProject(
nixattr="boost_graph",
arcdir=boost.make_arcdir("graph"),
owners=["g:cpp-contrib", "g:taxi-common"],
copy_sources=[
"include/boost/**/*.hpp",
"src/",
],
copy_sources_except=[
"include/boost/graph/use_mpi.hpp",
],
post_install=post_install,
)
|