Skip to content

Add support for modular build structure. #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 4 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
name: CI
on: [ push, pull_request ]
jobs:
ubuntu-focal:
runs-on: ubuntu-20.04
ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [ g++-9, g++-10, clang++-10 ]
compiler: [ g++-13, g++-14, clang++-19 ]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -24,10 +24,8 @@ jobs:
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-9 g++-10 clang-10 mpich
run: sudo apt install g++-13 g++-14 clang-19 mpich
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
Expand All @@ -54,53 +52,6 @@ jobs:
- name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17,2a
working-directory: ../boost-root/libs/graph_parallel/test
ubuntu-bionic:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
compiler: [ g++-7, g++-8, clang++-7, clang++-8 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-7 g++-8 clang-7 clang-8 mpich
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/graph_parallel
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py graph_parallel
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam && echo "using mpi ;" >> ~/user-config.jam'
working-directory: ../boost-root
- name: Config info install
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17
working-directory: ../boost-root/libs/graph_parallel/test
macos:
runs-on: macos-latest
strategy:
Expand Down
47 changes: 47 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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)

require-b2 5.2 ;

constant boost_dependencies :
/boost/algorithm//boost_algorithm
/boost/assert//boost_assert
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/container_hash//boost_container_hash
/boost/core//boost_core
/boost/detail//boost_detail
/boost/dynamic_bitset//boost_dynamic_bitset
/boost/filesystem//boost_filesystem
/boost/foreach//boost_foreach
/boost/function//boost_function
/boost/graph//boost_graph
/boost/iterator//boost_iterator
/boost/lexical_cast//boost_lexical_cast
/boost/mpi//boost_mpi
/boost/mpl//boost_mpl
/boost/optional//boost_optional
/boost/property_map//boost_property_map
/boost/property_map_parallel//boost_property_map_parallel
/boost/random//boost_random
/boost/serialization//boost_serialization
/boost/smart_ptr//boost_smart_ptr
/boost/static_assert//boost_static_assert
/boost/tuple//boost_tuple
/boost/type_traits//boost_type_traits
/boost/variant//boost_variant ;

project /boost/graph_parallel
;

explicit
[ alias boost_graph_parallel : build//boost_graph_parallel ]
[ alias all : boost_graph_parallel example test ]
;

call-if : boost-library graph_parallel
: install boost_graph_parallel
;

16 changes: 10 additions & 6 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@

import mpi ;

project boost/graph_parallel
project
: common-requirements <include>../include <library>$(boost_dependencies)
: requirements <include>../src
: source-location ../src
: usage-requirements <define>BOOST_GRAPH_PARALLEL_NO_LIB=1
;

local optional_sources ;
local optional_reqs ;

if [ mpi.configured ]
{
{
lib boost_graph_parallel
: mpi_process_group.cpp tag_allocator.cpp
: <library>../../mpi/build//boost_mpi
: <library>/boost/mpi//boost_mpi
<library>/mpi//mpi [ mpi.extra-requirements ]
<define>BOOST_GRAPH_NO_LIB=1
<link>shared:<define>BOOST_GRAPH_DYN_LINK=1
Expand All @@ -33,11 +35,13 @@ if [ mpi.configured ]
}
else
{
message boost_graph_parallel
alias boost_graph_parallel ;
if ! ( --without-graph_parallel in [ modules.peek : ARGV ] )
{
message boost_graph_parallel
: "warning: Graph library does not contain MPI-based parallel components."
: "note: to enable them, add \"using mpi ;\" to your user-config.jam."
: "note: to suppress this message, pass \"--without-graph_parallel\" to bjam."
;
}
}

boost-install boost_graph_parallel ;
9 changes: 6 additions & 3 deletions example/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
# http://www.boost.org/LICENSE_1_0.txt)


project : requirements <library>../build//boost_graph_parallel
<library>../../system/build//boost_system
<library>../../mpi/build//boost_mpi
using python ;

project : requirements <library>/boost/graph_parallel//boost_graph_parallel
<library>/boost/system//boost_system
<library>/boost/mpi//boost_mpi
<library>/python//python
;

exe breadth_first_search : breadth_first_search.cpp ;
Expand Down
14 changes: 8 additions & 6 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
# (C) Copyright 2005, 2006 Trustees of Indiana University
# (C) Copyright 2005 Douglas Gregor
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# 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.)

using python ;

# use-project /boost/mpi : ../build ;
project /boost/graph_parallel/test
: requirements
<library>/boost/graph_parallel//boost_graph_parallel
<library>/boost/system//boost_system
<library>/python//python
;

project /boost/graph_parallel/test
: requirements <library>../build//boost_graph_parallel <library>../../system/build//boost_system ;

import mpi : mpi-test ;

if [ mpi.configured ]
Expand Down Expand Up @@ -46,4 +49,3 @@ test-suite graph_parallel
}

build-project ../example ;

Loading