Skip to content

Commit 787bdff

Browse files
authored
Merge pull request #38 from grafikrobot/modular
Add support for modular build structure.
2 parents 39ef1fd + 48cb060 commit 787bdff

File tree

5 files changed

+75
-68
lines changed

5 files changed

+75
-68
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
name: CI
88
on: [ push, pull_request ]
99
jobs:
10-
ubuntu-focal:
11-
runs-on: ubuntu-20.04
10+
ubuntu:
11+
runs-on: ubuntu-latest
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
compiler: [ g++-9, g++-10, clang++-10 ]
15+
compiler: [ g++-13, g++-14, clang++-19 ]
1616
steps:
1717
- uses: actions/checkout@v2
1818
with:
@@ -24,10 +24,8 @@ jobs:
2424
fail-fast: true
2525
- name: Set TOOLSET
2626
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
27-
- name: Add repository
28-
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
2927
- name: Install packages
30-
run: sudo apt install g++-9 g++-10 clang-10 mpich
28+
run: sudo apt install g++-13 g++-14 clang-19 mpich
3129
- name: Checkout main boost
3230
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
3331
- name: Update tools/boostdep
@@ -54,53 +52,6 @@ jobs:
5452
- name: Test
5553
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17,2a
5654
working-directory: ../boost-root/libs/graph_parallel/test
57-
ubuntu-bionic:
58-
runs-on: ubuntu-18.04
59-
strategy:
60-
fail-fast: false
61-
matrix:
62-
compiler: [ g++-7, g++-8, clang++-7, clang++-8 ]
63-
steps:
64-
- uses: actions/checkout@v2
65-
with:
66-
fetch-depth: '0'
67-
- uses: mstachniuk/ci-skip@v1
68-
with:
69-
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
70-
commit-filter-separator: ';'
71-
fail-fast: true
72-
- name: Set TOOLSET
73-
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
74-
- name: Add repository
75-
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
76-
- name: Install packages
77-
run: sudo apt install g++-7 g++-8 clang-7 clang-8 mpich
78-
- name: Checkout main boost
79-
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
80-
- name: Update tools/boostdep
81-
run: git submodule update --init tools/boostdep
82-
working-directory: ../boost-root
83-
- name: Copy files
84-
run: cp -r $GITHUB_WORKSPACE/* libs/graph_parallel
85-
working-directory: ../boost-root
86-
- name: Install deps
87-
run: python tools/boostdep/depinst/depinst.py graph_parallel
88-
working-directory: ../boost-root
89-
- name: Bootstrap
90-
run: ./bootstrap.sh
91-
working-directory: ../boost-root
92-
- name: Generate headers
93-
run: ./b2 headers
94-
working-directory: ../boost-root
95-
- name: Generate user config
96-
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam && echo "using mpi ;" >> ~/user-config.jam'
97-
working-directory: ../boost-root
98-
- name: Config info install
99-
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17
100-
working-directory: ../boost-root/libs/config/test
101-
- name: Test
102-
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17
103-
working-directory: ../boost-root/libs/graph_parallel/test
10455
macos:
10556
runs-on: macos-latest
10657
strategy:

build.jam

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright René Ferdinand Rivera Morell 2024
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# (See accompanying file LICENSE_1_0.txt or copy at
4+
# http://www.boost.org/LICENSE_1_0.txt)
5+
6+
require-b2 5.2 ;
7+
8+
constant boost_dependencies :
9+
/boost/algorithm//boost_algorithm
10+
/boost/assert//boost_assert
11+
/boost/concept_check//boost_concept_check
12+
/boost/config//boost_config
13+
/boost/container_hash//boost_container_hash
14+
/boost/core//boost_core
15+
/boost/detail//boost_detail
16+
/boost/dynamic_bitset//boost_dynamic_bitset
17+
/boost/filesystem//boost_filesystem
18+
/boost/foreach//boost_foreach
19+
/boost/function//boost_function
20+
/boost/graph//boost_graph
21+
/boost/iterator//boost_iterator
22+
/boost/lexical_cast//boost_lexical_cast
23+
/boost/mpi//boost_mpi
24+
/boost/mpl//boost_mpl
25+
/boost/optional//boost_optional
26+
/boost/property_map//boost_property_map
27+
/boost/property_map_parallel//boost_property_map_parallel
28+
/boost/random//boost_random
29+
/boost/serialization//boost_serialization
30+
/boost/smart_ptr//boost_smart_ptr
31+
/boost/static_assert//boost_static_assert
32+
/boost/tuple//boost_tuple
33+
/boost/type_traits//boost_type_traits
34+
/boost/variant//boost_variant ;
35+
36+
project /boost/graph_parallel
37+
;
38+
39+
explicit
40+
[ alias boost_graph_parallel : build//boost_graph_parallel ]
41+
[ alias all : boost_graph_parallel example test ]
42+
;
43+
44+
call-if : boost-library graph_parallel
45+
: install boost_graph_parallel
46+
;
47+

build/Jamfile.v2

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66

77
import mpi ;
88

9-
project boost/graph_parallel
9+
project
10+
: common-requirements <include>../include <library>$(boost_dependencies)
1011
: requirements <include>../src
1112
: source-location ../src
13+
: usage-requirements <define>BOOST_GRAPH_PARALLEL_NO_LIB=1
1214
;
1315

1416
local optional_sources ;
1517
local optional_reqs ;
1618

1719
if [ mpi.configured ]
18-
{
20+
{
1921
lib boost_graph_parallel
2022
: mpi_process_group.cpp tag_allocator.cpp
21-
: <library>../../mpi/build//boost_mpi
23+
: <library>/boost/mpi//boost_mpi
2224
<library>/mpi//mpi [ mpi.extra-requirements ]
2325
<define>BOOST_GRAPH_NO_LIB=1
2426
<link>shared:<define>BOOST_GRAPH_DYN_LINK=1
@@ -33,11 +35,13 @@ if [ mpi.configured ]
3335
}
3436
else
3537
{
36-
message boost_graph_parallel
38+
alias boost_graph_parallel ;
39+
if ! ( --without-graph_parallel in [ modules.peek : ARGV ] )
40+
{
41+
message boost_graph_parallel
3742
: "warning: Graph library does not contain MPI-based parallel components."
3843
: "note: to enable them, add \"using mpi ;\" to your user-config.jam."
3944
: "note: to suppress this message, pass \"--without-graph_parallel\" to bjam."
4045
;
46+
}
4147
}
42-
43-
boost-install boost_graph_parallel ;

example/Jamfile.v2

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
# http://www.boost.org/LICENSE_1_0.txt)
66

77

8-
project : requirements <library>../build//boost_graph_parallel
9-
<library>../../system/build//boost_system
10-
<library>../../mpi/build//boost_mpi
8+
using python ;
9+
10+
project : requirements <library>/boost/graph_parallel//boost_graph_parallel
11+
<library>/boost/system//boost_system
12+
<library>/boost/mpi//boost_mpi
13+
<library>/python//python
1114
;
1215

1316
exe breadth_first_search : breadth_first_search.cpp ;

test/Jamfile.v2

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
# (C) Copyright 2005, 2006 Trustees of Indiana University
33
# (C) Copyright 2005 Douglas Gregor
44
#
5-
# Distributed under the Boost Software License, Version 1.0. (See accompanying
5+
# Distributed under the Boost Software License, Version 1.0. (See accompanying
66
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
77

8+
using python ;
89

9-
# use-project /boost/mpi : ../build ;
10+
project /boost/graph_parallel/test
11+
: requirements
12+
<library>/boost/graph_parallel//boost_graph_parallel
13+
<library>/boost/system//boost_system
14+
<library>/python//python
15+
;
1016

11-
project /boost/graph_parallel/test
12-
: requirements <library>../build//boost_graph_parallel <library>../../system/build//boost_system ;
13-
1417
import mpi : mpi-test ;
1518

1619
if [ mpi.configured ]
@@ -46,4 +49,3 @@ test-suite graph_parallel
4649
}
4750

4851
build-project ../example ;
49-

0 commit comments

Comments
 (0)